title: How to get a particular row in CActiveRecord in Yii framework?
body: <p>Lets say I have a record like the following</p>
  
  <p>Users
      - id
      - username
      - password </p>
  
  <p>While login i want to check user's x_username, x_password with this record and i should return the matched row. How to do that in CActiveRecord?</p>
  
  <p>I tried the following</p>
  
  <pre><code>$user = Users::model()-&gt;find('username = :x_username AND password = :x_password');
  </code></pre>
  
  <p>but its not working</p>
  
  <p>How to do this?</p>