Hey,
Another issue has raised its ugly head. Man I hate working with date ranges!!!!
I originally had the query:
And this is some of the data in my database:
Problem is if I want a date range that has a start date before the specified period but still is occuring i.e. a 6 month event and the end date is after the specified period.
i.e. entry 2 if I was searching for events between the period of 2009-05-01 and 2009-08-31. Should be 2 events id 1 and id 2.
Reality is built on a foundation of dreams.
Another issue has raised its ugly head. Man I hate working with date ranges!!!!
I originally had the query:
Code:
SELECT * FROM calendar WHERE (startdate < '2009-05-01' AND enddate > '2009-05-30');
Code:
id-------startdate----------enddate-------
1 2009-05-02 2009-05-04
2 2009-03-25 2009-09-18
3 2009-12-18 2010-01-30
4 2009-02-22 2009-02-26
i.e. entry 2 if I was searching for events between the period of 2009-05-01 and 2009-08-31. Should be 2 events id 1 and id 2.
Reality is built on a foundation of dreams.