I have a mySQL table named events with 4 fields (event_id, event_name, event_start_date, event_end_date)
The problem is retrieving the correct events
I would get the record for all the active events in a time period for example between 2011/03/01 to 2011/03/30
- event 1 starts at 2011/03/10 and ends 2011/03/20 (start and ends inside)
- event 2 starts at 2011/02/05 and ends 2011/03/23 (starts before and ends inside)
- event 3 starts at 2011/03/25 and ends 2011/05/01 (starts inside and ends after)
- event 4 starts at 2011/01/25 and ends 2011/10/12 (starts before and ends after)
All events are active during the considered time period and should be retrieved as records
I have no idea how to make it work correctly! Solutions? Suggestions? Ideas?
Thanks