Answer the question
In order to leave comments, you need to log in
How to embed a where condition in Yii query - “not equal to”?
I want to get fraternal products with one parent category.
return Product::model()->findAllByAttributes(array('CODE_PAR' => $code_par));
WHERE CODE != 'x'
Answer the question
In order to leave comments, you need to log in
return Product::model()->findAllByAttributes('CODE_PAR != :code_par', array(':code_par' => $code_par));
Person::model()->findByAttributes(
array('first_name'=>$firstName,'last_name'=>$lastName),
array(
'condition'=>'status != :status',
'params'=>array(':status'=>1)
)
);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question