Is it possible to use OR statement in Doctrine findBy() method? I know that given array is interpreted as case1 AND case2... Like this
$this->repos['notif']->findBy(array('status' => 1, 'status' => 2, 'status' => 3); Stands for
SELECT * FROM `notif` WHERE status=1 AND status=2 AND status=3; Now I need something to stand for:
SELECT * FROM `notif` WHERE status=1 OR status=2 OR status=3; Is there a way to get all cases?
You can write:
$this->repos['notif']->findBy(array('status' => array(1, 2, 3))); and that should work too.
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