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();