mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-24 00:55:35 +08:00
fix where body compiler
This commit is contained in:
@@ -9,8 +9,8 @@ trait WhereBody
|
|||||||
protected $where_thing = [];
|
protected $where_thing = [];
|
||||||
|
|
||||||
public function where($column, $operation_or_value, $value = null) {
|
public function where($column, $operation_or_value, $value = null) {
|
||||||
if (!in_array($operation_or_value, ['=', '!=', '>', '<', '>=', '<=', 'IN', 'in'])) $this->where_thing['='][$column] = $operation_or_value;
|
if ($value !== null) $this->where_thing[$operation_or_value][$column] = $value;
|
||||||
elseif ($value !== null) $this->where_thing[$operation_or_value][$column] = $value;
|
elseif (!in_array($operation_or_value, ['=', '!=', '>', '<', '>=', '<=', 'IN', 'in'])) $this->where_thing['='][$column] = $operation_or_value;
|
||||||
else $this->where_thing['='][$column] = $operation_or_value;
|
else $this->where_thing['='][$column] = $operation_or_value;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user