Hi how can i do a condition like that in drupal ?
WHERE (date = xxx and time = xxx) OR (date = xxx and time = xxx)
I want to do this condition with db_select.
Thanks.
thx for fast answer, i just found it.
here is my solution :
$and_1 = db_and()->condition('b.date' , $date, '=')->condition('b.time', $begin_time, '>');
$and_2 = db_and()->condition('b.date' , $tomorrow, '=')->condition('b.time', '00:00', '>=')
$query->condition(db_or()->condition($and_1)->condition($and_2));
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