I have the following table where teachers class routine are stored
Table Name: batchroutine_regular
batchid class_day subject teacherid class_start class_end
1 Sunday English-1 1001 02:00 PM 03:30 PM
1 Sunday Geography 1002 04:00 PM 05:30 PM
2 Monday Math 1001 10:00 AM 12:30 PM
2 Tuesday Geography 1001 01:00 PM 03:30 PM
Now lets say you are the teacher whose teacherid
is 1001
. You are asked to take a class on Monday which will start at 11:00 AM
and end at 1:00 PM
. Now my question is what would be the MYSQL/PHP query to find out if you are available at that time, from the table batchroutine_regular
?
Thanks in Advance :)