// Fixed Where for IN and NOT IN

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11814 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
bMancone
2011-12-27 17:37:37 +00:00
parent 6fff757757
commit 499a076ae6
+3 -3
View File
@@ -125,13 +125,13 @@ class CollectionCore implements Iterator, ArrayAccess, Countable
{
case '=' :
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;
case '!=' :
case '<>' :
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;
default :
@@ -434,7 +434,7 @@ class CollectionCore implements Iterator, ArrayAccess, Countable
$fieldname = $split[$i];
if ($fieldname == $definition['primary'])
$type = ObjectMode::TYPE_INT;
$type = ObjectModel::TYPE_INT;
else
{
if (!isset($definition['fields'][$fieldname]))