MySQL Great Circle Distance (Haversine formula)
From Google Code FAQ – Creating a Store Locator with PHP, MySQL & Google Maps: Here’s the SQL statement that will find the closest 20 locations that are within a radius of 25 miles to the 37, -122 coordinate. It calculates the distance based on the latitude/longitude of that row and the target latitude/longitude, and … Read more