So i have a database table that contains the a "event name", "start-date", "end-date" columns which is used in a calendar application im working on.
The events get shown one month at a time, and that is working great, except that it does not return any events that span over into an adjacent month. For example, an event that runs from 2/25 - 3/05.
I will only get events for the current month, provided the end-date is also within the month.
I know that this has to do with the SQL i'm writing. This is the sql that I currently have:
SELECT * FROM Events WHERE startdate >= '2/1/2011' AND enddate < '3/1/2011' ORDER BY StartDate
The dates above are dynamic.