Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calendar - recurrernce

Status
Not open for further replies.

LinuXelite

Programmer
Jun 21, 2002
150
CA
Hi,

I'm programming a calendar with PHP5/MySQL.

I want to implement periodicity (like Evolution or Outlook).

I have not idea how to do that!

Any suggestion is welcome :)
 
If you don't mind me saying, this is a little vague...

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
I know what you mean exactly since i went tru the same thing a month or so ago!

I tried to implement a more effecient method but it didn't work and what i then ended up to do was the following:

I created a form with the fields i'm intrested in and also asked the user to select the recurrence..monthly, weekly, yearly etc...

then when the user hits the apply button the script will

1) insert a new row in the events table
2) then it will check for recurence and the type of recurence
3) For each type i calculate the number of extra events that wll be created..
4) then i insert a new row for each of the recurence within the events table...making a reference to the original...
5) If the uer decides to update the record first each row will be deleted then reinstated with the script!

Hope this helped!

Nick
 
yes you're totally right but what i did was to make a fixed amount as a transition period! I know this is fallable but there is a much better or more efficient way!

Hope i've helped!

Nick
 
This method seems questionable to me... basically what you're saying is you're storing derived data... and derived data which is not very difficult to calculate. Why not just recalculate it? Cache it perhaps for the current day/week/month since that will get the most frequent views perhaps...

Have you checked out the Calendar class in PEAR? I haven't, but there's a chance it supports what you want.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top