views:

858

answers:

1

Before the answers start coming (which I know they will) I know that there are a million projects out there that have done this already. Having said that what I am trying to do is create an online calendar - using PHP & MySQL here is what I am planning ...

  1. tables in database

    ((calendar_item)
    id, title, start_date, start time, end time, recurrence_type_id,
    recurrence_qty, interval, end_date)
    ((recurrence_type)
    id, name, value (where I want to store the logic so it can be edited
    on the fly))
    ((calendar_item_exception)
    id, calendar_item_id, title, start_date, start time, end time,
    recurrence_type_id, recurrence_qty, interval, end_date)
    ((join_calendar_day)
    calendar_id, day_id)
    ((day)
    id, name)
    
  2. Basic flow, pull all records from the database INNER JOIN calendar_item and calendar_item_exception ON id/calendar_item_id

  3. begin by looking at today's date for an exception and print anything that's there... if nothing move on to the calendar_item

This all makes perfect sense in my head up until this point There is a term I like and it is "Fuzzy Logic", pretty much where I live so---

IF Anyone can help me, know where to go from here to add the actual logic for the recurrence_id and how to implement it... ie item is on __date recurs (recurrence_id) daily (qty) 5x (interval) every 3 days (join_calendar_day) on Monday, Wednesday, Friday

I have seen the ical format, and have looked at pear, but honestly can't grasp the next step in my head to make the exceptions (which I really want to see happen without using another framework... preferrably just PHP & MySQL)

and to clarify my question further, I am looking for real world examples, not abstract principles I am a visual designer and musician first not programmer, so I have to see something working so I can disect it to understand it

NO Pear, NO Ruby, NO Horde, NO Other frameworks... just PHP & Mysql as simple as possible please

If You can help ... THANK YOU!!!

+1  A: 

This is a duplicate of these questions:

A good link from one of those questions is this article about it by Martin Fowler.

Paolo Bergantino
I looked through those posts and they did not answer my specific question which is why I asked this. I also read through the pdf, I am looking for specific examples using real data in php in a way I can understand it, not abstract expressions... yes I am ADD And need help [;o)
Tim
On a side note, I realize that this question has been answered a million times, but the answer always involves some abstract principle, or use of a "Framework" of some kind, which does NOT answer MY question. I have looked for this answer for 6mos to no avail
Tim