check time range in mysql table with same day

I have a time stored in table 8:00AM-9:30AM TTH . I want to check time range, if user selected 9:00am-10:30am Thursday comes in between time 8:00AM -9:30PM? How to trap it out in php.

Time is stored in table as below

Time Day
8:00AM -9:30AM TTH
10:30AM -12:00PM MW
1:00PM -2:30PM MW
10:30AM -12:00PM FW

help me please this is my one of my error trap in my thesis project

thank you in advance

how is the db table setup? given that you’re trying to select specific days, it might be easier to create a column for each day and store the times as a unix timestamp (timestamp or datetime, or even just time). Then you can set up a query to look for just that day and what ever time range you want.

Sponsor our Newsletter | Privacy Policy | Terms of Service