nkhanna24 Posted January 28, 2013 Share Posted January 28, 2013 hi all how can you add 2 condition in defaultscope() method in model i have this 'condition' => "question.instituteId = " . Yii::app()->params['institute']['id'], i have to add question.instituteId =1, as well. thanks Link to comment Share on other sites More sharing options...
Larry Posted February 7, 2013 Share Posted February 7, 2013 I'm not sure that makes sense. Unless you want instituteId to be equal to Yii::app()->params['institute']['id'] OR 1. Is that the case? Link to comment Share on other sites More sharing options...
nkhanna24 Posted February 7, 2013 Author Share Posted February 7, 2013 yes actually that is the case....... Link to comment Share on other sites More sharing options...
Larry Posted February 8, 2013 Share Posted February 8, 2013 Then just do: 'condition' => "question.instituteId = " . Yii::app()->params['institute']['id'] . " OR question.instituteId=1"; Link to comment Share on other sites More sharing options...
Recommended Posts