title: Complete example on findByAttributes in Yii
body: <p>I am appreciated if someone shows a complete example on how to use findByAttributes in Yii framework. </p>
  
  <p>Official doc @ <a href="http://www.yiiframework.com/doc/api/1.1/CActiveRecord#findByAttributes-detail" rel="nofollow">http://www.yiiframework.com/doc/api/1.1/CActiveRecord#findByAttributes-detail</a></p>
  
  <pre><code>public CActiveRecord findByAttributes(array $attributes, mixed $condition='', array $params=array ( ))
  </code></pre>
  
  <p>I know how to use $attributes. I do not see a good reason to use <strong>$condition</strong> and <strong>$params</strong> in findByAttributes.</p>
  
  <p>Please tell me under what scenario, you use them in findByAttributes. </p>
  
  <p>Thank you</p>