# phpDox - Query\QueryBuilder::insertBatch

# Query\QueryBuilder::insertBatch

#### Creates and executes a batch insertion query

## Signature

`public function insertBatch(string $table, [array $data = ] )`

## Parameters

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

## Returns

PDOStatement

## Defined by Interface

`QueryBuilderInterface`

## Violations

### PHPMessDetector

Line | Rule | Message
--- | --- | ---
698 | UndefinedVariable | Avoid using undefined variables such as '$sql' which will lead to PHP notices.
700 | UndefinedVariable | Avoid using undefined variables such as '$sql' which will lead to PHP notices.
701 | UndefinedVariable | Avoid using undefined variables such as '$sql' which will lead to PHP notices.