Commit a1090056 authored by Alexander Butenko's avatar Alexander Butenko

Merge pull request #246 from avbdr/master

Fix for #245: correctly treat '0' values
parents bc286395 03e5d768
......@@ -911,7 +911,7 @@ class MysqliDb
$this->_bindParams ($val);
else if ($val === null)
$this->_query .= $operator . " NULL";
else if ($val != 'DBNULL')
else if ($val != 'DBNULL' || $val == '0')
$this->_query .= $this->_buildPair ($operator, $val);
}
}
......@@ -1028,7 +1028,7 @@ class MysqliDb
$val = $vals[$i++];
if (is_object ($val))
$val = '[object]';
if ($val == NULL)
if ($val === NULL)
$val = 'NULL';
$newStr .= substr ($str, 0, $pos) . "'". $val . "'";
$str = substr ($str, $pos + 1);
......
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