title: How to select DISTINCT of two columns from a table with condition in Yii?
body: <p>How to convert this sql statement to yii format build a model?</p>
  
  <pre><code>  SELECT  DISTINCT agency_id, university_id 
        FROM `tbl_universityagency` where agency_id=1
  </code></pre>
  
  <p>like this what I am missing? , </p>
  
  <pre><code>$criteria = new CDbCriteria();
          $criteria-&gt;distinct=true;            
          $criteria-&gt;condition = "agency_id=".$result-&gt;agency_id ;         
          $modal=Universityagency::model()-&gt;find($criteria); 
  </code></pre>