mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进Query类的chunk方法获取主键
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user