Hi i have a table structure like this.
table
**geoinfo**
id
name
desc
I have table
**zip_to_city**
id,
zip_id fk geoinfo
city_id fk geoinfo
than i also have
**zip_to_state**
id
zip_id fk geoinfo
state_id fk geoinfo
I want to query so that I am able to get each zip with the respective city and state. I don’t want the id, i want the name. geoinfo is the main table containing name and description of each geoinfo.
Whats the best query to do this?
This works for me and gets what i want.