jeudi 20 juin 2019

2 condition in 1 where clause in Laravel Builder

I want to convert my query into laravel builder format:

This is my working query:

SELECT * FROM tickets
WHERE tic_status_id = 65
AND (tic_escalation_date1 IS NULL OR tic_escalation_date1 < DATE('2019-06-22 13:00:00'))
AND (tic_escalation_date2 IS NULL OR tic_escalation_date2 < DATE('2019-06-22 13:00:00'))
AND (tic_escalation_date3 IS NULL OR tic_escalation_date3 < DATE('2019-06-22 13:00:00'))

I'm trying to use whereNull and orWhere but It's not working.



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2XvfYb4
via IFTTT

Aucun commentaire:

Enregistrer un commentaire