
January 4th, 2007
05:56 PM
Events Diary Help
Hi all,
I am developing a tourism website for our town, in the project is an events diary. I think I have everything covered except one problem.
How would I handle the recurrence of an event, say it happens every Wednesday at 3.00pm? I was thinking of having a seperate table that would handle this but i'm really not sure which way to go with it.
Thanks in advance.

January 4th, 2007
07:27 PM
God of Dynamic Web Site
Status: Offline!
You could have a column called "recurrence" (example) type: tinyint.
0 : One time
1 : Each Week
2 : Each Month
3 : Each Year
4 : Every Day
it's an example.

January 4th, 2007
07:39 PM
Hum... simple or what... sometimes I really do make things a little to complex.
In reality I guess you could get some more complex recurrence, for example:
Monday, Tuesday and Friday.

January 8th, 2007
05:05 AM
Neversidian
Status: Offline!
Mod Edit: goodbye.
- Sykil
Last edited by Sykil, January 8th, 2007 05:58 AM (Edited 1 times)

January 9th, 2007
06:51 AM
Neverside Newbie
Status: Offline!
I would prefer a table of reoccuring event definitions. The in the main diary, link date/time to that event definition.
This allows for changes e.g. to drop the event from one reoccurance without affecting others, or to slightly alter the detail of the reoccurance without affecting the main detail.
Additionally I prefer this simple left join query to extrapolating future events from reoccuring rules on each and every query.
___________________
Glasgow SEO