mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进Query类where方法
This commit is contained in:
@@ -906,13 +906,9 @@ class Query
|
|||||||
if (is_array($field)) {
|
if (is_array($field)) {
|
||||||
// 数组批量查询
|
// 数组批量查询
|
||||||
$where = $field;
|
$where = $field;
|
||||||
} elseif ($field) {
|
} elseif ($field && is_string($field)) {
|
||||||
// 字符串查询
|
// 字符串查询
|
||||||
if (is_numeric($field)) {
|
$where[$field] = ['null', ''];
|
||||||
$where[] = ['exp', $field];
|
|
||||||
} else {
|
|
||||||
$where[$field] = ['null', ''];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} elseif (is_array($op)) {
|
} elseif (is_array($op)) {
|
||||||
$where[$field] = $param;
|
$where[$field] = $param;
|
||||||
|
|||||||
Reference in New Issue
Block a user