From cf42b74f7cc131414d614cf53d5633b58feb489b Mon Sep 17 00:00:00 2001 From: Grant Furgiuele Date: Tue, 18 Mar 2014 15:21:43 -0500 Subject: [PATCH] Changed comment again to actually be correct. This is also consistent with the draft of the definitive guide. --- framework/db/DataReader.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/db/DataReader.php b/framework/db/DataReader.php index 30aab7ec23..678a383136 100644 --- a/framework/db/DataReader.php +++ b/framework/db/DataReader.php @@ -17,7 +17,8 @@ use yii\base\InvalidCallException; * iterating through the reader. For example, * * ~~~ - * $reader = $command->setSql('SELECT * FROM tbl_post'); + * $command = $connection->createCommand('SELECT * FROM tbl_post'); + * $reader = $command->query(); * * while ($row = $reader->read()) { * $rows[] = $row;