mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
改进Query类的chunk方法对主键的获取
This commit is contained in:
@@ -2045,7 +2045,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 ?: $this->getPk();
|
$column = $column ?: $this->getPk(isset($options['table']) ? $options['table'] : '');
|
||||||
$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