Its online calendar(in php) for a driving instructor where by clicking on a day it gives you that day's diary it has time slots from 08:00 to 20:00, all fine till if someone books more than an hr long lesson.
This query below works and avoids all the Overlaping BUT only for the first booking and thereafter it overlaps. Why??? Any thoughts please ???
SELECT COUNT(*) AS Cnt
AND e_time > '$s_time'
AND s_time < '$e_time'