From 0af5b072a930f272090fc73aeb31b6616c2a140d Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 3 May 2016 18:20:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BQuery=E7=B1=BB=E7=9A=84find?= =?UTF-8?q?=E6=96=B9=E6=B3=95=20=E6=94=AF=E6=8C=81=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E4=B8=BB=E9=94=AE=E4=B8=BA0=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index 3606766a..5b2067c1 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -1294,7 +1294,7 @@ class Query // 分析查询表达式 $options = $this->parseExpress(); - if (empty($options['where']) && !empty($data)) { + if (empty($options['where']) && (!empty($data) || 0 == $data)) { // AR模式分析主键条件 $this->parsePkWhere($data, $options); }