Your question, your audience. Choose who sees your identityâ€”and your questionâ€”with question security.
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
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
http://stackoverflow.com/questions/27928/how-do-i-calculate-distance-between-two-latitude-longitude-points
Good luck