In the not
in query it is still returning the roomname with cancelled status but when I removed the query for trapping of dates the status !='cancelled'
is working. Is there
something wrong with the query for trapping of dates?
$tbl_comp=mysql_query("SELECT * FROM roomlist
WHERE type='$roomtype' and status = '1'
and name NOT IN(select name from roomreservation where status !='cancelled'
and
arrival between '$arrival' and '$departure'
or departure between '$arrival' and '$departure'
or '$arrival' between arrival and departure
or '$departure' between arrival and departure)");