Jump to content

Recommended Posts

Hey all!

 

 

Quick question to the all knowing all seeing eyes in the mysql forum:

 

I'm designing a DB that encompasses location based search for end users and wanted to have the Search by form to be "Within (10, 20, 50, 100 miles dropdown) of Zip"

 

Right now I have the tables set up as

Location (Table)

location_ID (PK)

zip_ID (SK)

city (ENUM)

state (ENUM)

country (ENUM)

 

Zip (Table)

zip_ID (PK)

zip

 

This is only for 11 US states but will eventually expand to more (thus increasing the zip table and location table.

 

I know I'll likely have to do a redesign to add GPS long and lat coordinates but my questions are:

 

1. Current Table design seem reasonable?

 

2. Is there a resource where I can DL zip and corresponding GPS coordinates? Or rather than reinvent the wheel is there an existing code/table resource I can easily integrate?

 

Thank in advance

 

Popgun

 

Happy 09 btw

Link to comment
https://forums.phpfreaks.com/topic/143697-solved-location-based-search/
Share on other sites

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.