mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
改进Query类的chunk方法获取主键
This commit is contained in:
@@ -2031,7 +2031,7 @@ class Query
|
|||||||
public function chunk($count, $callback, $column = null)
|
public function chunk($count, $callback, $column = null)
|
||||||
{
|
{
|
||||||
$options = $this->getOptions();
|
$options = $this->getOptions();
|
||||||
$column = $column ?: ($options['pk'] ?: $this->getPk());
|
$column = $column ?: $this->getPk();
|
||||||
$bind = $this->bind;
|
$bind = $this->bind;
|
||||||
$resultSet = $this->limit($count)->order($column, 'asc')->select();
|
$resultSet = $this->limit($count)->order($column, 'asc')->select();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user