From 65053bc1a58f9107ce2313ea34f5274cafd7d091 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 17 Aug 2016 16:07:05 +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=E5=AF=B9=E4=B8=BB=E9=94=AE=E7=9A=84=E8=8E=B7?= =?UTF-8?q?=E5=8F=96?= 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 c743ac18..0ebea9ad 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -2045,7 +2045,7 @@ class Query public function chunk($count, $callback, $column = null) { $options = $this->getOptions(); - $column = $column ?: $this->getPk(); + $column = $column ?: $this->getPk(isset($options['table']) ? $options['table'] : ''); $bind = $this->bind; $resultSet = $this->limit($count)->order($column, 'asc')->select();