MySQL Forums
Forum List  »  General

Please, help me with MySQL query
Posted by: dsg news
Date: April 19, 2005 06:48AM

I have five tables on the database:
Room, Guest, Booking, Employee and Admin.

Room (room_ no, room_ type, price)

Guest (guest_ no, Fname, Sname, address,…)

Booking (room_no, guest_no, Fname, Sname, arrival_date,
departure_date, emp_no, user_name, password)

Employee (emp_no, Fname, Sname, uaser_name, password)

Admin (admin_no, fname, Lname, user_name, password)

I used the fallowing query to search for available rooms:

Select *
From Room R
Where R.room_no
NOT IN (Select B.room_no
From R.room_no = B.room_no
And R.room_type = ‘single’
And B.arrival_date = ‘2005-03-16’
And Bdeparture_date = ‘2005-04-19’

PROBLEM: Whenever I do a query on localhost it retrieves a value, but when I try on live on the remote server it shows an error. Please, tell me what the problem in my query could be?

Thanks for all your help.

Options: ReplyQuote


Subject
Written By
Posted
Please, help me with MySQL query
April 19, 2005 06:48AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.