Skip to content

Commit

Permalink
Fixed batch insert with empty rows;
Browse files Browse the repository at this point in the history
  • Loading branch information
edgardmessias committed Aug 1, 2016
1 parent 4bc3a7c commit bdff50f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,10 @@ public function update($table, $columns, $condition, &$params)
*/
public function batchInsert($table, $columns, $rows)
{
if (empty($rows)) {
return '';
}

$schema = $this->db->getSchema();
if (($tableSchema = $schema->getTableSchema($table)) !== null) {
$columnSchemas = $tableSchema->columns;
Expand Down

0 comments on commit bdff50f

Please sign in to comment.