Find first free date in agenda
问题 in my component I have created an agenda, where user can save their appointments. Agenda table is quite simple: there is a title, description and start/end datetime fields. When a user adds a new event, I'd wish to hint him with the first empty spot. How can I achieve that? Is that possible with a single/bunch queries, or I have to create a loop until I find the first empty spot? For example this is my table: | ID | Start date | End date | | 1 | 2012-06-14 09:00:00 | 2012-06-14 09:32:00 | | 2