mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-17 06:48:59 +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,
|
* 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;
|
||||||
|
|||||||
Reference in New Issue
Block a user