first of all i have a table like this:
userID Day Hour Class
---------------------------------------
65 Monday 08:00 Math
65 Monday 09:00 Bio
65 Monday 13:00 History
65 Tuesday 08:00 Sports
65 Friday 10:00 Math
I am choosing the classes according to the current time.
When it is 08:30 then i need to choose the next Hour which is 09:00 and it is Bio. And it is fine.
But when it is 10:00 then i need to choose 13:00 which is History.
Added: lets say today is Tuesday and it is 07:00 o’clock. With the code below , I can choose tne next coming Class whish is at 08:00 on Tuesday.
Lets assume today is Tuesday and 12:00 o’clock. How can I choose the next lecture which is on Friday (next weekday that I have a class on).
When I have no class in one day ,how can I choose the next avaible day that I have a class …?
try something like this: