在not
查询中,它仍然返回具有取消状态的房间名称,但是当我删除用于捕获日期的查询时,它status !='cancelled'
正在工作。捕获日期的查询有问题吗?
$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)");