Fix where_in is wiping previous where/and/or.
For now, works as an AND, but maybe later, same as where will exists new methods: AndIn and OrIN.
This commit is contained in:
parent
df424ffab5
commit
3d2a607768
@ -581,9 +581,14 @@ class Model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($in)
|
if ($in)
|
||||||
static::$querySelect['where'] = "$column IN (".join(', ', $arrIn).")";
|
$where_in = "$column IN (".join(', ', $arrIn).")";
|
||||||
else
|
else
|
||||||
static::$querySelect['where'] = "$column NOT IN (".join(', ', $arrIn).")";
|
$where_in = "$column NOT IN (".join(', ', $arrIn).")";
|
||||||
|
|
||||||
|
if (static::$querySelect['where'] == '')
|
||||||
|
static::$querySelect['where'] = $where_in;
|
||||||
|
else
|
||||||
|
static::$querySelect['where'] .= " AND $where_in";
|
||||||
|
|
||||||
return new static();
|
return new static();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user