Hi all,
I do this:
$connection=Yii::app()->db;
$sql = "select * from tbl_google where tbl_google.page = '$page'";
$command = $connection->createCommand($sql);
$dataReader = $command->query();
return $dataReader;
When I ask
$dataReader->count(); // return 1
$dataReader->current(); // Empty
When I do
$sql = "select * from tbl_google where tbl_google.page = '$page'";
$command = $connection->createCommand($sql);
$dataReader = $command->queryAll();
return $dataReader;
Then $dataReader[0][‘columnName’] is not empty and gives me the good result
Do you know why the first method is not good ?
Thanks