سؤال

How to make in Query Builder (Doctrine) construction WHERE condition A AND (condition B OR condition C) ??

I have tried

->where
->andwhere
->orwhere

And

->where
->orwhere
->orwhere

But both dont work

هل كانت مفيدة؟

المحلول

It can be done this way:

                ->where("bp.active = :active")
                ->andWhere("p.name1 Like :name OR p.name2 Like :name")
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top