From 933a61467b0f9bc849c9f8bfdc18de532e31ca07 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sat, 18 Jun 2016 09:48:53 +0800 Subject: [PATCH] =?UTF-8?q?Query=E7=B1=BB=E4=BF=AE=E6=94=B9=20find?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E6=9F=A5=E8=AF=A2=E4=B8=8D=E5=88=B0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=BF=94=E5=9B=9E=20NULL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Query.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index 58cc07ab..3d1eb166 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -1735,7 +1735,7 @@ class Query $sql = $this->builder()->select($options); if($options['fetch_sql']){ // 获取实际执行的SQL语句 - return $this->connection->getRealSql($sql,$this->bind); + return $this->connection->getRealSql($sql, $this->bind); } // 执行查询操作 $resultSet = $this->query($sql, $this->getBind(), $options['master'], $options['fetch_class']); @@ -1753,7 +1753,6 @@ class Query // 返回结果处理 if ($resultSet) { - // 数据列表读取后的处理 if (!empty($this->model)) { // 生成模型对象 @@ -1821,7 +1820,7 @@ class Query $sql = $this->builder()->select($options); if($options['fetch_sql']){ // 获取实际执行的SQL语句 - return $this->connection->getRealSql($sql,$this->bind); + return $this->connection->getRealSql($sql, $this->bind); } // 执行查询 $result = $this->query($sql, $this->getBind(), $options['master'], $options['fetch_class']); @@ -1861,7 +1860,7 @@ class Query throw new DataNotFoundException('table data not Found:' . $options['table'], $options['table'], $options); } } else { - $data = false; + $data = null; } return $data; }