改进Query类的查询方法

This commit is contained in:
thinkphp
2016-09-01 13:31:30 +08:00
parent f317df1506
commit da4b98fca7

View File

@@ -908,7 +908,11 @@ class Query
$where = $field;
} elseif ($field) {
// 字符串查询
$where[$field] = ['null', ''];
if (is_numeric($field)) {
$where[] = ['exp', $field];
} else {
$where[$field] = ['null', ''];
}
}
} elseif (is_array($op)) {
$where[$field] = $param;