"SELECT * FROM reservation WHERE roomnum = {$room['roomnum']}
AND roomtype = {$room['roomtype']}
AND (dateout NOT BETWEEN '$start' AND '$end'
OR datein NOT BETWEEN '$start' AND '$end')"
When I run this query I get the following error:
You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND (dateout NOT BETWEEN '2010-11-22' AND '2010-11-30' OR datei' at line 3
I have tried reformatting this query for a while (using () and removing the statements that come before the NOT BETWEEN statements). The end result is always a syntax error. Is there an issue with running two betweens?
Thanks, Ryan