首页 > 代码库 > Yii的Dao查询

Yii的Dao查询

$connection=Yii::app()->db;
$command=$connection->createCommand(‘select media_type from sand_media‘);
$column=$command->queryColumn();

将以数组的形式返回所有的media_type

Yii的Dao查询