marketboy Posted February 10, 2009 Share Posted February 10, 2009 There are a few different ways to go about my issue, so I will start with the back info. We have a database table with information housed for unique listings. Each listing page is displayed by grabbing the unique ID from the url and querying the database for that listing's information. One of those fields is a zip code. In a separate table in the same db we have all of the zip codes in the US, with corresponding lat. and long. for them. The problem we are facing is, we need to have the listing page load with the unique listing information, then take that zip code, and reference the zip code table in the database to return the lat. and long. coordinates. I'm not sure if that is logistically possible. The other option would be to add lat. and long. fields to the listing table, so each listing would have a lat. and long. value. This seems the easier answer, but my question then is what would be the best possible way to do that? We would then need to compare the listing table zip code field, to the zip code table field, reference the coordinates and copy them to the respective fields in the listing table. Any guidance would be much appreciated! Thanks in advance. Let me know if I am unclear or can provide a better explination. Quote Link to comment https://forums.phpfreaks.com/topic/144672-compare-and-update-tables-with-existing-information-from-separate-table/ Share on other sites More sharing options...
aschk Posted February 12, 2009 Share Posted February 12, 2009 Please provide a schema layout, some sample data, and what you need inserting/storing. Quote Link to comment https://forums.phpfreaks.com/topic/144672-compare-and-update-tables-with-existing-information-from-separate-table/#findComment-760384 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.