You know it's been done before by many the many calendar systems out 
there. You really just want to store the event once and you wouldn't 
want to even replicate the event ID out to whatever date. I would search 
the php class libraries and free software to see how they did it. I'm 
someone has done a calendar management system.
Off the top of my head, you could store the event date & time 
information like unix cron does. That should allow for quick searching 
on what events need to be displayed.


On Wednesday, August 21, 2002, at 01:54 PM, Matt Schroebel wrote:

> I have a calendar application that shows events in a month.  I want to 
> add the ability to have re-occuring events.  I've been thinking about 
> how to do that, but it's not seeming to be too easy.
>
> Say, I have a table of re-occuring events:
> eventId int
> eventName varchar
> eventStartDate date
> eventEndDate date
> eventOccuranceType enum(weekly, monthly, daily)
> eventInterval int
> eventDOW int
>
> Should I populate the actual events table with re-occuring events at 
> insert/update/delete times, or should I code the event listing page to 
> determine if there are events that would occur in the month shown? The 
> first way would be costly at insert time, and may add lots of events 
> that will never occur -- plus one can't go on forever, so at some 
> point, it seems, it would have to do the second way anyway.   The 
> second way, is costly at page view time.  With a small number of 
> re-occurring events, that probably wouldn't be an issue, but as the 
> calendar usage grows, I can see that becoming resource costly.
>
> Is there a better way?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to