We've just overhauled our calendaring up to support recurring events.  We
just took the interface from outlook, and stored all that data in the events
table.  Then we have a separate table to store the eventDates (and it's just
3 fields, eventDateId, eventID and eventDate).  When I save the event, I
update the eventDate table and insert every date that the event falls on.
So if it recurrs every third tues until next year, I loop monthly until next
year and store every event date.  I believe this is far more efficient then
calculating it on the fly.  I got some functions off cflib to calculate
things like third tues of the month, etc.   

The only problem I foresee is when an event has no end date.  But in that
case, I'll probably pick some crazy date in the future and make that my stop
date.   

-----Original Message-----
From: Damien McKenna [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 29, 2005 4:17 PM
To: CF-Talk
Subject: RE: Man, I'm just really banging my head over this one...

I wrote an events manager.  I ended up splitting up the database structure
to handle once date-specific (16th-19th) events versus day-specific (every
second Tuesday).  Then just use some of the built-in functions and those
from cflib to compile it all for display.  I took a bit of an easy approach
though, I don't have a calendar display but it shouldn't take too much
effort to get to there from where I am now.

--
Damien McKenna - Web Developer - [EMAIL PROTECTED] The Limu
Company - http://www.thelimucompany.com/ - 407-804-1014 #include <stdjoke.h>




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225631
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to