摘要:
例1$connection=Yii::app()->db;$sql="SELECT*FROM`project`ORDERBYidDESC";$command=$connection->createCommand($sql);$result=$command->queryAll();print_r($result);例2$db=Yii::app()->db;//youhavetodefinedbconnectioninconfig/main.php$sql="selectsum(if(starttime>'09:00:00 阅读全文