I have a PlaceID | PlaceName | Lat | Lon as my database structure.
Say I have my current latitude and longitude as
$lat = "37.331862";
$lon = "-122.029937";
I want to find places that are in a 100 feet radius. Might allow the user to choose.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You may be interested in checking out the following presentation:
The author describes how you can use the Haversine Formula in MySQL to order by proximity and limit your searches to a defined range. He also describes how to avoid a full table scan for such queries, using traditional indexes on the latitude and longitude columns.
1 PDF Version