Lets say I have a record like the following
Users - id - username - password
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?
I tried the following
$user = Users::model()->find('username = :x_username AND password = :x_password');
but its not working
How to do this?
try this
OR