Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

findByAttributes Example

Explanation for the use of $condition and $param in findByAttributes in Yii

In most case, this is how I use findByAttributes

Person::model()->findByAttributes(array('first_name'=>$firstName,'last_name'=>$lastName));
like image 923
Ninad Avatar asked Mar 24 '23 17:03

Ninad


1 Answers

Copy from this thread http://www.yiiframework.com/forum/index.php/topic/21178-findbyattributes-example/ Explain what you want to do and where is your errors. Try to read documentation http://www.yiiframework.com/doc/api/1.1/CActiveRecord#findByAttributes-detail

like image 143
ineersa Avatar answered Mar 26 '23 06:03

ineersa