[eluser]Gewa[/eluser]
[quote author="bradym" date="1211698072"]Create two tables:
event_data
- id
- name
- description
- location (if the location changes, this would go in event_session)
event_sessions
- event_id
- start_time
- end_time
- date
Create a form where the user enters the data for the event, as well as the start and end dates, start and end times. Write code to cycle through the date ranges and create an entry in entry_sessions for each day and time of the event.
This way if an event is canceled or rescheduled for some reason you can cancel or reschedule that specific event without having to worry about all of the other sessions of the event. You may want to add a canceled field to event_sessions to help with that.[/quote]
I think better to add location in event_sessions table , as for example the same Indiana Johnes goes at 10.00-Cineplex, 13.00-CIneplex, 10.00-Another Cinema, 11.00-Another Cinema.
event_data
- id
- name
- description
- location
-status(active,disabled,postponed)
event_sessions
- event_id
- start_time
- end_time
- date
- location
-status
The problem of database is solved i think. The thing I couldn't understand and do properly is how to organize the ENTER EVENT section, to do it easyli.
Is it to make 2 step..
1. Step1.Enter Event add_event(id,name,description)
2.Add Event schedule add_event_date_loc ($event_id)
First function is very easy. Second one is problem . How is better to arrange the form...
There is for example each sunday in Disco N is going Party B, start at 10.00
or .
There is Play "XXXX" in Volksteater which will be on 12.06.2008 start on 16.00, 15.06.2008 start on 19.00 and 10 different variants.
So the form should be really good organized, and analizing function where all data will be posted the data also. I had no big experience with the dates ..
I am in blocked street.. Please help me go out