Jump to content

[SOLVED] Location Based Search


Popgun

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

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.