title: CDbcriteria in yii.?
body: <p>How to write the following query using CDBcriteria,
  I am trying to show my data in grid view using cdbcriteria.Is there any other way to show data in cgridview  without using CDBcriteria.</p>
  
  <pre><code>SELECT * 
  FROM  `user` 
  WHERE role =  'employer'
  
  I have tried like below:
  
  $criteria = new CDbCriteria;
  
  $criteria-&gt;condition = 'role=employer';
  return new CActiveDataProvider('manageemployers', array(
  'criteria'=&gt;$criteria,
  
  But its showing error
  </code></pre>