I am trying to use this method to find an active record.
What I am looking for?
select * from tbl_user where username= {sameparam} or email= {sameparam};
I tried this:
$usermodel=User::model()->findByAttributes(array('username'=>$value, 'email'=>$value),$condition='or');
by default findByAttributes method performs an 'AND' operation, more like:
select * from tbl_user where username= {param} and email= {param};
any ideas?
Thank you.
What I am looking for?
select * from tbl_user where username= {sameparam} or email= {sameparam};
I tried this:
$usermodel=User::model()->findByAttributes(array('username'=>$value, 'email'=>$value),$condition='or');
by default findByAttributes method performs an 'AND' operation, more like:
select * from tbl_user where username= {param} and email= {param};
any ideas?
Thank you.