Hello,
I'm trying to write a 'next events' mySQL query to display the events on every page. I have to account for the possibility that there may be more than one event on that day, and display all events on that day.
I do this at the moment by getting a limited number of results, then looping and comparing dates until they are not equal to the first returned date, from the following statement.
"SELECT events.cid, events.title FROM events WHERE events.cdate >= CURRENT_DATE ORDER BY events.cdate, events.ctime LIMIT X";
This strikes me as inefficient and doesn't accomodate when there might be more than X events on the next event day. Is there a query that will select all events on the next day that there are events?
Cheers,
Ben