From 1a089223ea4b3b2e5311059de32346a4ee46f1d9 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 9 Aug 2016 11:14:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BQuery=E7=B1=BB=E7=9A=84chunk?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E8=8E=B7=E5=8F=96=E4=B8=BB=E9=94=AE?= 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 73223d2a..5ddd89c0 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -2031,7 +2031,7 @@ class Query public function chunk($count, $callback, $column = null) { $options = $this->getOptions(); - $column = $column ?: ($options['pk'] ?: $this->getPk()); + $column = $column ?: $this->getPk(); $bind = $this->bind; $resultSet = $this->limit($count)->order($column, 'asc')->select();