Database name:
Citybreak
CITY TABLE
city_id, city_name, city_desc, hotel_1, hotel_2, hotel_3)
HOTEL TABLE
hotel_id, hotel_name, hotel_desc
so i have inserted a hotel_id into hotel_1, hotel_2 and hotel_3 as this will allow me to choose which hotels i want to display for that city.
now i want to write a sql query to say:
if your displaying a city it will also display the 3 hotels we defined with the hotel_1, hotel_2 and hotel_3 fields in the city table.
Any Ideas?
I have tried this query so far:
SELECT city.city_id, city.city_name, hotel.hotel_name FROM city, hotel INNER JOIN hotel WHERE hotel.hotel_id = city.city_hotel_1
This gives me one hotel, but i want to show all 3.