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 44c8895 commit 4b1dd0dCopy full SHA for 4b1dd0d
MysqliDb.php
@@ -1094,7 +1094,15 @@ protected function _buildOnDuplicate($tableData)
1094
if ($this->_lastInsertId)
1095
$this->_query .= $this->_lastInsertId . "=LAST_INSERT_ID (".$this->_lastInsertId."), ";
1096
1097
- $this->_buildDataPairs ($tableData, $this->_updateColumns, false);
+ foreach ($this->_updateColumns as $key => $val) {
1098
+ // skip all params without a value
1099
+ if (is_numeric ($key)) {
1100
+ $this->_updateColumns[$val] = '';
1101
+ unset ($this->_updateColumns[$key]);
1102
+ } else
1103
+ $tableData[$key] = $val;
1104
+ }
1105
+ $this->_buildDataPairs ($tableData, array_keys ($this->_updateColumns), false);
1106
}
1107
1108
0 commit comments