Hi All
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 ???
Zed
Code:
SELECT COUNT(*) AS Cnt
FROM booking
WHERE request_date='$request_date'
AND e_time > '$s_time'
AND s_time < '$e_time'