We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be8b612 commit f889dbcCopy full SHA for f889dbc
MysqliDb.php
@@ -1331,7 +1331,9 @@ protected function _buildInsertQuery($tableData)
1331
$isInsert = preg_match('/^[INSERT|REPLACE]/', $this->_query);
1332
$dataColumns = array_keys($tableData);
1333
if ($isInsert) {
1334
- $this->_query .= ' (`' . implode($dataColumns, '`, `') . '`) VALUES (';
+ if (isset ($dataColumns[0]))
1335
+ $this->_query .= ' (`' . implode($dataColumns, '`, `') . '`) ';
1336
+ $this->_query .= ' VALUES (';
1337
} else {
1338
$this->_query .= " SET ";
1339
}
0 commit comments