http://stackoverflow.com/questions/27928/how-do-i-calculate-distance-between-two-latitude-longitude-points
Good luck
SELECT * , ((
ACOS( SIN( ".$lat." * PI( ) /180 ) * SIN( lat_centroid * PI( ) /180 ) + COS( ".$lat." * PI( ) /180 ) * COS( lat_centroid * PI( ) /180 ) * COS( (
".$long." - long_centroid) * PI( ) /180 ) ) *180 / PI( )) *60 * 1.1515) AS `distance` FROM ".$this->table." HAVING distance <=100 ORDER BY distance LIMIT 0 , 10
If you are experiencing a similar issue, please ask a related question
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
14 Experts available now in Live!