Breaking News

Editors Picks

Tuesday, June 19, 2012

distance between two latitude longitude points in mysql


SELECT (1000 * 6371 * ACOS(COS(RADIANS(23.2323)) * COS( RADIANS(LATITUDE))* COS(RADIANS(LONGITUDE) - RADIANS(77.7777))+ SIN(RADIANS(23.2323))* SIN(RADIANS(LATITUDE)))) AS distance FROM TableName HAVING distance < maxdis ORDER BY distance

No comments :

Post a Comment

Contact Us

Name

Email *

Message *