SELECT Doesn't work
Posted: Wed May 22, 2002 1:42 pm
I'm running the following selection and I don't recive any results. I should have results, but I'm new to MySql and I don't know if I'm doing something unsupported by MySql.
I'm trying to bring the name of a city from a table with the city code taht is a foreing key in another table.
The selection is:
SELECT h.name,c.name FROM hotel h, city c WHERE h.cityID = 15 and c.id = h.cityID
I made other selections and it works badly. Am I doing something wrong?
I'm trying to bring the name of a city from a table with the city code taht is a foreing key in another table.
The selection is:
SELECT h.name,c.name FROM hotel h, city c WHERE h.cityID = 15 and c.id = h.cityID
I made other selections and it works badly. Am I doing something wrong?