I am creating a database for the shops and their location. I don't want the user to enter what ever city name or country name he wants. So I have created two tables.
cities which I have the
country_id in the
cities table to link the city to the
So in my shop table I have a
city_id which then I can access it in my view with
$shop->city to get for example "New York" and then I call
$city->country to get "USA". Then I display them like "New York, USA".
Is this the right approach to do it? I mean the last part which is
$city->country or there is a better way?