Results 1 to 2 of 2

Thread: Select Query

  1. #1
    Join Date
    Aug 2009

    Unanswered: Select Query

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

  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    saw this before on the other forum, and you have the same problem here -- not enough information

    please dump the table layout and a few rows of representative sample data | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts