mirror of
https://github.com/sruupl/batflat.git
synced 2026-01-10 07:52:04 +01:00
Fix "in" operator (and more generally array values) in where clause on QueryBuilder.
This commit is contained in:
@@ -285,12 +285,13 @@ class QueryBuilder
|
||||
$value = '(' . implode(',', array_fill(0, count($value), '?')) . ')';
|
||||
} else {
|
||||
array_push($this->condition_binds, $value);
|
||||
$value = "?";
|
||||
}
|
||||
|
||||
if (empty($this->conditions) || strpos(end($this->conditions), '(') !== false) {
|
||||
array_push($this->conditions, "$column $operator ?");
|
||||
array_push($this->conditions, "$column $operator $value");
|
||||
} else {
|
||||
array_push($this->conditions, "$ao $column $operator ?");
|
||||
array_push($this->conditions, "$ao $column $operator $value");
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
||||
Reference in New Issue
Block a user