mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
改进Query类分页方法
This commit is contained in:
@@ -1009,9 +1009,11 @@ class Query
|
|||||||
$total = $this->count();
|
$total = $this->count();
|
||||||
$bind = $this->bind;
|
$bind = $this->bind;
|
||||||
$results = $this->options($options)->bind($bind)->page($page, $listRows)->select();
|
$results = $this->options($options)->bind($bind)->page($page, $listRows)->select();
|
||||||
} else {
|
} elseif ($simple) {
|
||||||
$results = $this->limit(($page - 1) * $listRows, $listRows + 1)->select();
|
$results = $this->limit(($page - 1) * $listRows, $listRows + 1)->select();
|
||||||
$total = isset($total) ? $total : null;
|
$total = null;
|
||||||
|
} else {
|
||||||
|
$results = $this->page($page, $listRows)->select();
|
||||||
}
|
}
|
||||||
return $class::make($results, $listRows, $page, $total, $simple, $config);
|
return $class::make($results, $listRows, $page, $total, $simple, $config);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user