Help make a SQL query ..
There is a table with dates:
id | date | startTime | endTime ---+------------+-----------+-------- 1 | 2018-06-02 | 00:00 | 02:00 2 | 2018-06-02 | 02:00 | 04:00 3 | 2018-06-02 | 18:00 | 19:00 4 | 2018-06-02 | 21:30 | 22:00 You need to get records from it that affect the incoming date.
For example, incoming 2018-06-02 15: 00-17: 00 will not return any, and 2018-06-02 18: 00-21: 40 will return 3 and 4 entries. Thank.