From ddb1d702e9ac922a12d3bb5a1401c4b151931850 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 26 Sep 2016 16:17:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BQuery=E7=B1=BB=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E6=96=B9=E6=B3=95?= 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 53bbbe85..19696646 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -1009,9 +1009,11 @@ class Query $total = $this->count(); $bind = $this->bind; $results = $this->options($options)->bind($bind)->page($page, $listRows)->select(); - } else { + } elseif ($simple) { $results = $this->limit(($page - 1) * $listRows, $listRows + 1)->select(); - $total = isset($total) ? $total : null; + $total = null; + } else { + $results = $this->page($page, $listRows)->select(); } return $class::make($results, $listRows, $page, $total, $simple, $config); }