Jump to content

Compare and update tables with existing information from separate table.


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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.