wispas Posted February 26, 2010 Share Posted February 26, 2010 I have this SQL query at the moment: SELECT * FROM city INNER JOIN packages ON packages.city_code = city.city_code WHERE city_id='$id'; I have another table i want to inner join called hotel. Does anyone know how to add this into the SQL query above. Link to comment https://forums.phpfreaks.com/topic/193461-multiple-inner-joins/ Share on other sites More sharing options...
fenway Posted February 26, 2010 Share Posted February 26, 2010 Just add yet another join. Link to comment https://forums.phpfreaks.com/topic/193461-multiple-inner-joins/#findComment-1018588 Share on other sites More sharing options...
zeodragonzord Posted March 1, 2010 Share Posted March 1, 2010 You do the same thing, just add another INNER JOIN clause. SELECT * FROM city INNER JOIN packages ON packages.city_code = city.city_code INNER JOIN hotel ON tableIAmJoiningOn.field = hotel.hotelField WHERE city.city_id='$id'; Link to comment https://forums.phpfreaks.com/topic/193461-multiple-inner-joins/#findComment-1020104 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.