i really got no idea how to only display the roomtype and roomprice from the table roomtype. I do really hope someone can help me as i have spent 5 hours only for this one query (yes..i admit i'm not talented in this stuff..), so please,if there's anyone can give any ideas for me to solve this...
i do appreciate it so much...
below is the query that i'm working on that never success :
select distinct roomtype, roomprice from roomtype where romtypeID IN (
select roomtypeID, roomID from rooms where roomID NOT IN (
select roomID froom booking where checkin>="2010-04-01" AND checkout<="2010-04-06"))
when i test it at phpmyadmin, the problem comes from the outter select which is the part "select distinct...".
when i tested it, the subselect works fine..the problems comes from the select distinct part
it wasn't the typo error though. maybe it was the unfunctionality of my own query as i'm still new and maybe there's no logic in that query. hope someone can be able to help to get some sense into the query
i would want the query to first, find the available room the checkin and checkout, then it will display the room available in the based on the table rooms that contains roomID and roomtypeID.
Then, from the roomtypeID(frm table room) as a foreign key to the roomtypeID in the table roomtype, it will display the roomprice and roomtype from roomtype.
The display of the roomprice and roomtype is really important as i want to sent the value of the roomtypeID to the next page of the php form by using id