mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-16 22:39:52 +08:00
Merge pull request #2802 from Skyh13/yii2-docs-2340
Update usage example in comments of db\DataReader
This commit is contained in:
@@ -17,7 +17,8 @@ use yii\base\InvalidCallException;
|
||||
* 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()) {
|
||||
* $rows[] = $row;
|
||||
|
||||
Reference in New Issue
Block a user