From e2a1a619958bed244ac45cc21d5b934bbc5c3920 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Thu, 4 Jan 2018 16:25:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9Bchunk=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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index 755f454b..b3d365a7 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -2605,7 +2605,9 @@ class Query public function chunk($count, $callback, $column = null, $order = 'asc') { $options = $this->getOptions(); - + if (empty($options['table'])) { + $options['table'] = $this->getTable(); + } $column = $column ?: $this->getPk($options); if (isset($options['order'])) {