$bookStart = "2011-11-25";
$bookEnd = "2011-11-30";
mysql_select_db($database_connresort, $connresort);
$query = "SELECT * FROM bookings WHERE ($bookStart BETWEEN startdate and enddate) or ($bookEnd BETWEEN startdate and enddate) ";
$rsCheck = mysql_query($query, $connresort) or die(mysql_error());
$row_rsCheck=mysql_num_rows($rsCheck );
if ($row_rsCheck!=0){
echo"มีคนจองแล้ว";
}else{
echo "ยังไม่มีคนจอง";
}
?>