In my post yesterday I talked about calculating geographical distances. During my research I’d come across this http://www.scribd.com/doc/2569355/Geo-Distance-Search-with-MySQL. It was a super interesting read and helped me get a much better understanding of what it is I am even doing.
Okay this is complicated stuff. Working on putting together a new site for a client, I have a table of locations with longitude and latitude fields for every row (I actually had a tab delimited file, but I sucked it into the db). For the functionality on the web front end a user needs to search by distance, e.g. find all locations within 10 miles of a zip code. Um okay, so how the hell do I do this?
Well first of I need to get the latitude and longitude for a zip code. For that I very quickly found…