Commit fddd9467 by Qiang Xue

Merge branch 'master' of github.com:yiisoft/yii2

parents ee994efd 2418dca8
...@@ -28,7 +28,7 @@ use yii\base\Object; ...@@ -28,7 +28,7 @@ use yii\base\Object;
* { * {
* $query = Article::find()->where(array('status' => 1)); * $query = Article::find()->where(array('status' => 1));
* $countQuery = clone $query; * $countQuery = clone $query;
* $pages = new Pagination($countQuery->count()); * $pages = new Pagination(array('itemCount' => $countQuery->count()));
* $models = $query->offset($pages->offset) * $models = $query->offset($pages->offset)
* ->limit($pages->limit) * ->limit($pages->limit)
* ->all(); * ->all();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment