# phpDox - Query\QueryBuilder::updateBatch

# Query\QueryBuilder::updateBatch

#### Creates a batch update, and executes it.

Returns the number of affected rows

## Signature

`public function updateBatch(string $table, array $data, string $where )`

## Parameters

`$table` — string
`$data` — array
`$where` — string

## Returns

int|null

## Defined by Interface

`QueryBuilderInterface`

## Violations

### PHPMessDetector

Line | Rule | Message
--- | --- | ---
739 | UndefinedVariable | Avoid using undefined variables such as '$sql' which will lead to PHP notices.
739 | UndefinedVariable | Avoid using undefined variables such as '$affectedRows' which will lead to PHP notices.
741 | UndefinedVariable | Avoid using undefined variables such as '$sql' which will lead to PHP notices.
742 | UndefinedVariable | Avoid using undefined variables such as '$affectedRows' which will lead to PHP notices.