Ok, I've moved the query out of the loop. The events are now stored in an array. Here's the header comment for the function that stores the data:
// Get all the events for the specified month.
//
// The events are extracted from the database Events table, and stored in the
// array $events_for_month, which is indexed by the day of the month.
//
// Events are stored in ascending order of date (E_Date).
//
// Examples:
// $events_for_month[5] is an array containing the events for the fifth day of the month.
// $events_for_month[5][2] is an array containing the third event for the fifth day of the month.
// $events_for_month[5][2]['E_Location'] is a scalar containing the E_Location column for the third event
// for the fifth day of the month.
function get_events_for_month($month, $year) {
Does this look reasonable? It seems to work correctly.
Last edited by Dave_L; 12/07/2002 9:33 PM.