I am building a site where there will be a bunch of companies and their business listing, so they will have their Address, City, State, Zip Code, etc.
I found this website here: http://jesseprice.com/mysql-city-state-zip-latitude-longitude-database/ which has a database of all city, state, zip, county, lat, long.
I imported the database above, so my question is how would I connect this to my companies table? And when a company signs up, I guess I could make a drop down for the state, and then it will drop down to the cities found in that state pulling from the database so they choose from the those, and then the zip code. Would that work? So they wouldn't have to enter it in themselves?
I'm just a little confused on how to do this properly and all make it work together.
Thank you.
Option 1:
Add ALL fields to your address table, referencing the selected table on additions, placing city, state, zip, county, lat and long into your table.
Advantages:
Option 2:
Add a zip field only, and for all lookups, pull the data from the downloaded table.
Advantages:
I would actually recommend adding the fields into your managed table, and keep the downloaded table as a read-only, replaceable reference table.