Najjar
Thank you for your response. I think this will help clarify the post, it's about as concise as I can make it.
My question: what might a query look like that would account for recurring "events".
a) The query is based on url variables in the form of
page.php?date=yyyy-mm-dd and each of these date components are already available on the page using an explode function, as $year, $month, $day This value is being matched on event.datestart column
For an event to recur, a value is set in the following table as either: " Day" " Week" "Month" or "Year" in recur_eve:
'event'
event.datestart - events that recurr start here
event.dateend - ending time for recurring events ( * not required )
event.recur_eve - contains " Day" " Week" "Month" or "Year" or nothing at all
I've been matching on .datestart column with the extracted varaibles for all events except recurring. This won't work for recurring events, since: events that recur, and fall into the time period of .datestart, can and may have been started prior to COLOR=DarkRed[/COLOR] any date url valiable.
As an example: to find all events that occur today, I search on 2005-11-16 but this will exclude recurring events that were set to occur today, since they had a start date prior to 2005-11-16. So I need to find a way to account for not only those events that have a start date of today in the .datestart column, but those that had a prior start date and recur today.
note: events that recur may or may not have and end date in 'dateend' column. If they do not have an end date, they simply recur to the end of the calendar.
Examples of recurring events set by:
"Year"
.datestart
2004-10-16
recurs on:
2005-11-16/ / today, yet it was started a year earler
"Month"
.datestart
2005-10-16
recurs on:
2005-11-16/ / today, yet it was started a month earler
"Week"
.datestart
2005-11-09
recurs on:
2005-11-16 // today, yet it was started a week earler
2005-11-23
"Day"
To set to recur by Day just means they occur every day. It could have been started any prior day -- it would occur today as long as "dateend" is today or after.
My idea was to find a way to set date intervals on the page that can account for prior start dates (yet that would include the url variable date) for the Year Month and Week possible recurrances. But not sure how to execute this.