diff --git a/composer.json b/composer.json index 4cc1743..417fc0d 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "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": { diff --git a/framework/composer.json b/framework/composer.json index 8260adb..bcd3927 100644 --- a/framework/composer.json +++ b/framework/composer.json @@ -1,6 +1,6 @@ { "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": { diff --git a/framework/yii/data/SqlDataProvider.php b/framework/yii/data/SqlDataProvider.php index ad5f4e4..d8f0cd1 100644 --- a/framework/yii/data/SqlDataProvider.php +++ b/framework/yii/data/SqlDataProvider.php @@ -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(); * ~~~