yii, Executing a SQL without calling a Model
<? $connection=Yii::app()->db; $sql = "SELECT id,username FROM users"; $command = $connection->createCommand($sql); $dataReader=$command->query(); $rows=$dataReader->readAll(); print_r($rows); ?>