I am designing a calendar, actually, I am translating it over from asp to php. The calendar, among other things, checks a database to see if any events are occurring on a certain day, if there are, the day is color coded and the date is turned into a link to a list of events for the day.
Depending on the number of months shown, this series of queries can be rather taxing on a database. In asp, I resolved the performance hit by downloading the recordset for the entire 3-month period (the calendar shows quarterly) and then filter the recordset as each day is checked. Still a little slow, but we don't have to go back and initiate another query for each day.
Question. Is there a function like this in MySQL? Can I download the entire 1- to 3-month period once and then filter it as required, removing the filter and refiltering as I see fit.
Creating a temporary table in the database to house the info for retrieval is not an answer, it still requires multiple queries (anywhere from 30-92).
Any help would be greatly appreciated.
Jim Hawley
Depending on the number of months shown, this series of queries can be rather taxing on a database. In asp, I resolved the performance hit by downloading the recordset for the entire 3-month period (the calendar shows quarterly) and then filter the recordset as each day is checked. Still a little slow, but we don't have to go back and initiate another query for each day.
Question. Is there a function like this in MySQL? Can I download the entire 1- to 3-month period once and then filter it as required, removing the filter and refiltering as I see fit.
Creating a temporary table in the database to house the info for retrieval is not an answer, it still requires multiple queries (anywhere from 30-92).
Any help would be greatly appreciated.
Jim Hawley