From 2e6ba63ed9e0424f62ec6b1a813ae7fec58a4ff1 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 18 Apr 2016 17:14:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9Bwhere=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E4=BC=A0=E7=A9=BA=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Query.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index 6bca6b0a..216fa440 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -462,9 +462,11 @@ class Query if (is_array($field)) { // 数组批量查询 $where = $field; - } else { + } elseif ($field) { // 字符串查询 $where[] = ['exp', $field]; + } else { + $where = ''; } } elseif (is_array($op)) { $param = func_get_args();