Answer the question
In order to leave comments, you need to log in
compare()?" />
Yii how to ignore empty attributes (null, "") in $criteria->compare()?
actually, a subject,
for example, I send a form in which not all fields are filled
, then my query string looks like
/
activity?
it can be seen that only Activity[responsible_id]=526 is filled, all the rest are empty
when I assign attributes, and then I try to display CGridView (dataProvider=>$model->search()) - empty fields are taken into account in my request, and it does not correctly find data
how to ignore empty fields?
db mysql
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question