Thanks in advance for any advice or tips!
I have a booking table in a mysql database, table1
. It contains a start date and a finish date.
I have another table, table2
which contains the information I need to get but only when a specific date does NOT reside between any of the dates from any rows in table1
.
An example;
select table2.testfield
FROM table2, table1
WHERE '2011-02-24 18:00:00'
NOT BETWEEN table1.start
AND table1.finish
However I cannot get it to work! Any suggestions?
See Question&Answers more detail:os