// Fixed Where for IN and NOT IN
This commit is contained in:
@@ -125,13 +125,13 @@ class CollectionCore implements Iterator, ArrayAccess, Countable
|
|||||||
{
|
{
|
||||||
case '=' :
|
case '=' :
|
||||||
case 'in' :
|
case 'in' :
|
||||||
$this->query->where($this->parseField($field).' IN('.implode(', ', $this->formatValue($value, $field)));
|
$this->query->where($this->parseField($field).' IN('.implode(', ', $this->formatValue($value, $field)).')');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '!=' :
|
case '!=' :
|
||||||
case '<>' :
|
case '<>' :
|
||||||
case 'notin' :
|
case 'notin' :
|
||||||
$this->query->where($this->parseField($field).' NOT IN('.implode(', ', $this->formatValue($value, $field)));
|
$this->query->where($this->parseField($field).' NOT IN('.implode(', ', $this->formatValue($value, $field)).')');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default :
|
default :
|
||||||
@@ -434,7 +434,7 @@ class CollectionCore implements Iterator, ArrayAccess, Countable
|
|||||||
|
|
||||||
$fieldname = $split[$i];
|
$fieldname = $split[$i];
|
||||||
if ($fieldname == $definition['primary'])
|
if ($fieldname == $definition['primary'])
|
||||||
$type = ObjectMode::TYPE_INT;
|
$type = ObjectModel::TYPE_INT;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!isset($definition['fields'][$fieldname]))
|
if (!isset($definition['fields'][$fieldname]))
|
||||||
|
|||||||
Reference in New Issue
Block a user