Added check for NOT in key when array count === 1 to prevent SQL error

This commit is contained in:
Scott Harwell 2012-01-18 15:04:53 -05:00
parent 7e9e3f92a7
commit e1738c8c4a

View file

@ -2368,7 +2368,7 @@ class DboSource extends DataSource {
$keys = array_keys($value);
if ($keys === array_values($keys)) {
$count = count($value);
if ($count === 1) {
if ($count === 1 && !preg_match("/\s+NOT$/", $key)) {
$data = $this->_quoteFields($key) . ' = (';
} else {
$data = $this->_quoteFields($key) . ' IN (';