怎么把这个sql语句转成yii格式建模型?
SELECT DISTINCT agency_id, university_id
FROM `tbl_universityagency` where agency_id=1
像这样我错过了什么?,
$criteria = new CDbCriteria();
$criteria->distinct=true;
$criteria->condition = "agency_id=".$result->agency_id ;
$modal=Universityagency::model()->find($criteria);