Is this the correct way ? for a report

Hotel (hotelNo, hotelName, city)
Room (roomNo, hotelNo, type, price)
Booking (guestNo, dateFrom, dateTo, roomNo)
Guest (guestNo, guestName, guestAddress)


What kind of reports will be required for one particular hotel? Write at least one SELECT statement (queries) per report.
SELECT hotel, guestname,price,date
FROM guest, hotel,room
INNER JOIN BOOKING
ON guestNO=BOOKING roomno

what happened when you tested this?™

really it nothing happens

nothing happened? you got an error message

i would call that “something”

no error as well :S i tryed ever coding but cant figure out what is wrong with it

[quote=“Sevim_WebDesign, post:5, topic:189283, full:true”]
no error as well [/quote]well, sir, i can see the error from here

so you are somehow not getting your error messages

where/how are you running this query?

phpmyadmin

You still should be getting all sorts of errors.

First, becuase hotel is a table name, not a fiedl.
Second because date is not the name of a field either
Thris because you only have showed one relatoinship but you’re calling for data from three tables.

I highly suspect that your INNER JOIN is not using the right fields either but if they have the same data type, that will not give you an error.

Seriously, and no offense intended, but do you read your books and the notes that your teacher gives you?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.