From b47fe5553b71c54fdbfce067e293275ea7cacbf1 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Thu, 12 Jan 2017 12:17:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3null=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=9A=84=E6=9D=A1=E4=BB=B6=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Query.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index 5ed6fb17..9c796081 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -1158,13 +1158,15 @@ class Query } } elseif ($field && is_string($field)) { // 字符串查询 - $where[$field] = ['null', '']; + $where[$field] = ['null', '']; + $this->options['multi'][$logic][$field][] = $where[$field]; } } elseif (is_array($op)) { $where[$field] = $param; } elseif (in_array(strtolower($op), ['null', 'notnull', 'not null'])) { // null查询 - $where[$field] = [$op, '']; + $where[$field] = [$op, '']; + $this->options['multi'][$logic][$field][] = $where[$field]; } elseif (is_null($condition)) { // 字段相等查询 $where[$field] = ['eq', $op];