改进Query类的分页方法 支持参数绑定

This commit is contained in:
thinkphp
2016-09-07 19:22:10 +08:00
parent 8ce128cc3e
commit 83ad0ced1b

View File

@@ -1007,7 +1007,8 @@ class Query
if (!$simple) {
$options = $this->getOptions();
$total = $this->count();
$results = $this->options($options)->page($page, $listRows)->select();
$bind = $this->bind;
$results = $this->options($options)->bind($bind)->page($page, $listRows)->select();
} else {
$results = $this->limit(($page - 1) * $listRows, $listRows + 1)->select();
$total = null;