IN () being false could still result in a true result of used in an OR, so instead of just returning, use an always false sql equivalent
parent
0e88c58e0c
commit
5b29e018d0
|
@ -103,9 +103,8 @@ class ZM_Object {
|
||||||
$fields[] = '`'.$field.'` IN ('.implode(',', array_map($func, $value)). ')';
|
$fields[] = '`'.$field.'` IN ('.implode(',', array_map($func, $value)). ')';
|
||||||
$values += $value;
|
$values += $value;
|
||||||
} else {
|
} else {
|
||||||
return array();
|
$fields[] = '`'.$field'` IN (select top 0 0)'; # evaluates to false
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$fields[] = '`'.$field.'`=?';
|
$fields[] = '`'.$field.'`=?';
|
||||||
$values[] = $value;
|
$values[] = $value;
|
||||||
|
|
Loading…
Reference in New Issue