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));
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With