改进chunk方法

This commit is contained in:
thinkphp
2018-01-04 16:25:44 +08:00
parent f0c2dd2bba
commit e2a1a61995

View File

@@ -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'])) {