为什么它仍然获得取消状态的房间?有人能帮帮我吗?正确的语法应该是什么?
$que=mysql_query("SELECT * from roomreservation where roomtype='$roomtype' and name='$name' and status != 'cancelled' and
arrival > '$arrival' and arrival < '$departure' and
or
departure >'$arrival' and departure <'$departure' and
or
'$arrival' > arrival and '$arrival' < departure and
or
'$departure' > arrival and '$departure' < departure and
or
'$arrival' = arrival and '$departure' = departure and
or
'$arrival' = arrival or '$departure' = departure and
");
$num_rows = mysql_num_rows($que);
if($num_rows >0)
{ $error="Room Already Reserved <br/>Please Choose another date";
header("location:rescheduleroom.php? id=$id&type=$roomtype&roomnumber=$name&error=$error");
}