With MySQL, I need to find rows where two values are between two columns.
For example, I'm creating a schedule from '15:00' to '18:00', but the query must verify if any row has an period in use. If there is a record from '14:00' to '18:30', I need to return it to validate.
I tried something like, but not works:
select * from availabilities where (('15:00' or '18:00') between start_hour and end_hour)
Any idea?