Commit 80d7b5ff authored by Alexander Butenko's avatar Alexander Butenko

Enclose field names into quotes for reserve keywords usage in INSERT/UPDATE

parent a0ff4263
......@@ -499,13 +499,13 @@ class MysqliDb
if ($isInsert !== false) {
//is insert statement
$this->_query .= '(' . implode(array_keys($tableData), ', ') . ')';
$this->_query .= '(`' . implode(array_keys($tableData), '`, `') . '`)';
$this->_query .= ' VALUES(';
}
foreach ($tableData as $column => $value) {
if ($isUpdate !== false)
$this->_query .= $column." = ";
$this->_query .= "`" . $column . "` = ";
if (!is_array ($value)) {
$this->_bindParam ($value);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment