how can i select event in multiple records as days in resultset
Example:
id | event | dateFrom | dateTo
1 festival 2012-06-15 01:18:00 2012-06-17 01:18:00
Result:
id | date
1 2012-06-15
1 2012-06-16
1 2012-06-17
You can’t. Best way is to make a simple table filled with all the dates of a year.
I made a simple stored procedure:
Your query will look like:
SELECT date FROM calendar WHERE date BETWEEN dateFrom AND dateTo