I'm trying to develop a classroom scheduling application. Users login, enter the time, class, room#, their name, and comments. I had implemented it in such way that time (hh:mm) was dived by 1 hour blocks and the user could only reserve one block at a time
To give more flexibility I now have 30 min blocks and allow the user to choose a starting and ending time; this way if the class is 2 hours and 30 minutes long, the can enter it as such (e.g., StartTime=02:00 to EndTime=04:30).
The problem is that I don't know how to process the time blocks so that when displaying the final reservation schedule it will show more than one 30 min block at a time per record; e.g., if the class is 1 hour long, the application should reserve two 30 minutes block for that class; if the class is 2:30 hours long, then reserve five 30 minutes blocks, etc.
If this sounds confusing, imagine how the inside of my head is at this moment
MySQL db has the following columns: TimeStamp, StartTime, EndTime, monday, tuesday, wednesday, thursday, friday, room, class, section, teacher, comments ... all of them are varchar and are processed via a form.
Any ideas???
Thanks.