i have a problem with time redundancy check.
my system checks whether the date,venue,time start and time end redundant with the records in the database
the codes are :
SELECT * FROM booking WHERE Date = '$Date' AND Venue = '$Venue' AND ((Time_start >= '$TimeStart' AND Time_end < '$TimeEnd') OR (Time_end > '$TimeStart' AND Time_end <= '$TimeEnd'))
if($totalRows_Check!=0)
{
//redundant msg
}
else
{
//proceed
}
data in DB:
Date=2006-02-19
Venue=Hall C
Time_start=09:00:00
Time_end=12:00:00
let say if the user input:
$Date=2006-02-19
$Venue=Hall C
$TimeStart=10:00:00
$TimeEnd=11:00:00
u can see the user input is redundant to the current data in database but the query returns 0 row.i'm so 😕 right now.please someone help me