Hello all.
Im trying to figure out a way to build a "music selection system".... Simular to a Ticket booking system,i want through a front end [ form or likely ] be able to specify weekday and start/endhour for a certain genre of music...
In short :
There will be no need for having a calender and be able to book a "real" date, as this weekly based
so the all the possible dates will be ; Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday
The start/end times must be able to atlest be specified down to 15min interval.
So the user shall be able to create an "event" like this example:
Weekday - monday : Starhour - 00:00 : Endhour - 06:45 : Genre - Smoothjazz
Inputing this is not a problem into a db, The problem comes when you want to make
a new "EVENT" Then some how you must check if there is an on going event that conflicts
with the day/time that the new event has...I have tried several diffrent angels to attack this but i think i havent found the right one yett.
The first DB design i did was basic like this
Table WEEKDAY
| ID | WEEKDAY |
Table BOOKING
ID | WEEKDAY | STARTHOUR | ENDHOUR | GENRE
But i couldnt figure out a way to check if a new STARTHOUR was earlier then the last ENDHOUR.
So i moved on to using seconds insteed 3600 / hour ... but that didnt realy solve my problems ither..
So please have anyone got an idea how to proceed?... maybe just show me your thoughts.. cause im
stuck it seems like....
// Carl