mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-09 11:32:48 +08:00
db增加whereif操作
This commit is contained in:
@@ -57,4 +57,13 @@ class QueryBase extends DbQuery
|
|||||||
|
|
||||||
return md5(json_encode($options));
|
return md5(json_encode($options));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function whereIf($where_condition, $field, $op = null, $condition = null)
|
||||||
|
{
|
||||||
|
if ($where_condition) {
|
||||||
|
$this->where($field, $op, $condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user