For Yii Framework:
$connection=Yii::app()->db;
$sql = "SELECT *****" ;
$command=$connection->createCommand($sql);
$dataReader=$command->query();
foreach($dataReader as $row){
echo $row['key'];
}
For more:
http://www.yiiframework.com/doc/guide/1.1/en/database.dao
No comments:
Post a Comment