Jesse wrote:
This is not necessarily SQL Specific, but it will impact my MySQL
application.
Using the zip code, how can you determine what's in a (say) 50 mile
radius. In other words, if I'm looking for schools within a 50 mile
radius of my location (Zip Code 33881), How can I determine this by
the zip code? I have seen lots of search engines that do this, but
don't know how they determine the distance. I figured that I can use
the first 4 digits as a match, then the first 3 digits which will be a
little further away, but I don't know how accurate that would be.
Does anyone have any ideas?
Thanks,
Jesse
You need to get a table that gives you the latitude and longitude of
each zip code. The location is of course some where near the center of
the zip code so these calculations won't be perfect. Once you have the
latitude and longitude it just takes some math to figure out the
distance. Not sure where you get the data but someone here probably
knows. You can find details on the calculations here...
http://williams.best.vwh.net/avform.htm
--
Chris W
KE5GIX
Gift Giving Made Easy
Get the gifts you want &
give the gifts they want
One stop wish list for any gift,
from anywhere, for any occasion!
http://thewishzone.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]