From 087e968b806846a985e66ccc57624ea8328f5a51 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 26 Oct 2016 11:34:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BQuery=E7=B1=BBwhere=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Query.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index 796dd769..0c9d8ef7 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -906,13 +906,9 @@ class Query if (is_array($field)) { // 数组批量查询 $where = $field; - } elseif ($field) { + } elseif ($field && is_string($field)) { // 字符串查询 - if (is_numeric($field)) { - $where[] = ['exp', $field]; - } else { - $where[$field] = ['null', '']; - } + $where[$field] = ['null', '']; } } elseif (is_array($op)) { $where[$field] = $param;