Commit 89472955 by Qiang Xue

doc fix.

parent 98b4540e
{
"name": "yiisoft/yii2-dev",
"description": "Yii2 Web Programming Framework - Development Package",
"description": "Yii PHP Framework Version 2 - Development Package",
"keywords": ["yii", "framework"],
"homepage": "http://www.yiiframework.com/",
"type": "yii2-extension",
......@@ -39,21 +39,6 @@
"name": "Paul Klimov",
"email": "klimov.paul@gmail.com",
"role": "Core framework development"
},
{
"name": "Wei Zhuo",
"email": "weizhuo@gmail.com",
"role": "Project site maintenance and development"
},
{
"name": "Sebastián Thierer",
"email": "sebas@artfos.com",
"role": "Component development"
},
{
"name": "Jeffrey Winesett",
"email": "jefftulsa@gmail.com",
"role": "Documentation and marketing"
}
],
"support": {
......
{
"name": "yiisoft/yii2",
"description": "Yii2 Web Programming Framework",
"description": "Yii PHP Framework Version 2",
"keywords": ["yii", "framework"],
"homepage": "http://www.yiiframework.com/",
"type": "library",
......@@ -39,21 +39,6 @@
"name": "Paul Klimov",
"email": "klimov.paul@gmail.com",
"role": "Core framework development"
},
{
"name": "Wei Zhuo",
"email": "weizhuo@gmail.com",
"role": "Project site maintenance and development"
},
{
"name": "Sebastián Thierer",
"email": "sebas@artfos.com",
"role": "Component development"
},
{
"name": "Jeffrey Winesett",
"email": "jefftulsa@gmail.com",
"role": "Documentation and marketing"
}
],
"support": {
......
......@@ -25,7 +25,10 @@ use yii\db\Connection;
* SqlDataProvider may be used in the following way:
*
* ~~~
* $count = Yii::$app->db->createCommand('SELECT COUNT(*) FROM tbl_user')->queryScalar();
* $count = Yii::$app->db->createCommand('
* SELECT COUNT(*) FROM tbl_user WHERE status=:status
* ', [':status' => 1])->queryScalar();
*
* $dataProvider = new SqlDataProvider([
* 'sql' => 'SELECT * FROM tbl_user WHERE status=:status',
* 'params' => [':status' => 1],
......@@ -45,6 +48,7 @@ use yii\db\Connection;
* 'pageSize' => 20,
* ],
* ]);
*
* // get the user records in the current page
* $models = $dataProvider->getModels();
* ~~~
......
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