The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 2 of 2

Thread: mysql syntax help

  1. #1

    mysql syntax help

    good day experts!! i would like to ask why do i get this error?

    SELECT tbl_rooms.*,tbl_cottage_number.*,tbl_cottage_type. *,tbl_room_number.* FROM tbl_rooms,tbl_cottage_number,tbl_cottage_type,tbl_ room_number WHERE tbl_rooms.FK_cottage_type=tbl_cottage_type.PK_cott age_type_id AND tbl_rooms.FK_cottage_number=tbl_cottage_number.PK_ cottage_number_id AND tbl_rooms.FK_room_number=tbl_room_number.PK_room_n umber_id AND tbl_cottage_type.PK_cottage_type_id = 1 AND tbl_rooms.PK_room_id NOT IN (SELECT tbl_booking.FK_rooms FROM tbl_booking WHERE (tbl_booking.check_in_date <= '2008-01-07 08:00:00' AND tbl_booking.check_out_date BETWEEN '2008-01-07 08:00:00' AND '2008-01-08 07:50:00') OR (tbl_booking.check_in_date BETWEEN '2008-01-07 08:00:00' AND '2008-01-08 07:50:00' AND tbl_booking.check_out_date <= 2008-01-08 07:50:00))
    in mysql query browser it says:

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '07:50:00))' at line 1

    please help me correct my syntax.. thanks!!
    Last edited by ivlem; January 10th, 2008 at 01:33 PM. Reason: codes

  2. #2
    602
    posts
    Backend Specialist
    Code:
    2008-01-08 07:50:00
    is not in quotations.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012