Jump to content

Compare and update tables with existing information from separate table.


marketboy

Recommended Posts

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.