Re: [PHP-DB] how to get records from one table that are not in anothertable

2003-07-27 Thread John W. Holmes
Smita Manohar wrote: can anyone pls help me out to make the query like.. if two tables have some comman records then how to find records from one table that are not in another table. eg... i have one table room type master (room_type_m) fields : room_type_id, room_type_name and other details

Re: [PHP-DB] how to get records from one table that are not in anothertable

2003-07-27 Thread John W. Holmes
Aaron Wolski wrote: Do you have a good book recommendation for MySQL.. I'm looking for more knowledge on improving my queries, etc. LEFT JOINS were completely unfamiliar (still are) until you helped me with my 3 query into 1 problem I had last week. I've heard that MySQL, Second Edition by Paul

Re: [PHP-DB] how to get records from one table that are not in anothertable

2003-07-27 Thread John W. Holmes
Smita Manohar wrote: but there is one more criteria, hotel_id from table hotel_room_type_d should be equal to some value i modified it like this... SELECT A.room_type_id, room_type_desc FROM room_type_m A LEFT JOIN hotel_room_type_d B ON A.room_type_id = B.room_type_id WHERE B.room_type_id