我正在尝试验证您何时获得相同的日期,相同的时间和相同的地点,它不会插入数据库中。如果 1 个实例返回 false,它只会插入数据库。
$res_date = $_POST['res_date'];
$res_venue = $_POST['res_venue'];
$res_dur = $_POST['res_duration'];
$qryjay = mysql_query("SELECT * FROM tbl_reservation WHERE res_date='$res_date' AND res_dur = '$res_dur' AND res_venue = '$res_venue'");
if ((mysql_num_rows($qryjay) == $res_date) && ($qryjay == $res_dur) && ($qryjay) == $res_venue){
echo "<script language=javascript>alert('".$res_venue." is not available on ".$res_dur." on ".$res_date."!')</script>";
}