Add handling of NOT IN and =\[\] and \!\[\]
This commit is contained in:
parent
e523777ece
commit
b32164e992
|
@ -174,6 +174,7 @@ class FilterTerm {
|
||||||
case 'IN' :
|
case 'IN' :
|
||||||
return ' IN ';
|
return ' IN ';
|
||||||
case '![]' :
|
case '![]' :
|
||||||
|
case 'NOT IN' :
|
||||||
return ' NOT IN ';
|
return ' NOT IN ';
|
||||||
case 'EXISTS' :
|
case 'EXISTS' :
|
||||||
return ' EXISTS ';
|
return ' EXISTS ';
|
||||||
|
@ -303,7 +304,7 @@ class FilterTerm {
|
||||||
}
|
}
|
||||||
$sql .= $this->sql_operator();
|
$sql .= $this->sql_operator();
|
||||||
$values = $this->sql_values();
|
$values = $this->sql_values();
|
||||||
if ( (count($values) > 1) or ($this->op == 'IN') or ($this->op == 'NOT IN') ) {
|
if ((count($values) > 1) or ($this->op == 'IN') or ($this->op == 'NOT IN') or ($this->op == '=[]') or ($this->op == '![]')) {
|
||||||
$sql .= '('.join(',', $values).')';
|
$sql .= '('.join(',', $values).')';
|
||||||
} else {
|
} else {
|
||||||
$sql .= $values[0];
|
$sql .= $values[0];
|
||||||
|
|
Loading…
Reference in New Issue