Merge pull request #2802 from Skyh13/yii2-docs-2340

Update usage example in comments of db\DataReader
This commit is contained in:
Qiang Xue
2014-03-18 18:19:14 -04:00

View File

@@ -17,7 +17,8 @@ use yii\base\InvalidCallException;
* iterating through the reader. For example, * iterating through the reader. For example,
* *
* ~~~ * ~~~
* $reader = $command->query('SELECT * FROM tbl_post'); * $command = $connection->createCommand('SELECT * FROM tbl_post');
* $reader = $command->query();
* *
* while ($row = $reader->read()) { * while ($row = $reader->read()) {
* $rows[] = $row; * $rows[] = $row;