Answers for "php get closest location by latitude longitude"

SQL
0

php get closest location by latitude longitude

SELECT * , (3956 * 2 * ASIN(SQRT( POWER(SIN(( $lat - LatOnTable) *  pi()/180 / 2), 2) +COS( $lat * pi()/180) * COS(LatOnTable * pi()/180) * POWER(SIN(( $long - LongOnTable) * pi()/180 / 2), 2) ))) as distance  
from yourTable  
having  distance <= 10 
order by distance
Posted by: Guest on August-31-2021

Code answers related to "php get closest location by latitude longitude"

Code answers related to "SQL"

Browse Popular Code Answers by Language