NEARBY LOCATIONS FROM MYSQL DATABASE
SELECT *, ((ACOS(SIN(-7.796986 * PI() / 180) * SIN(lat * PI() / 180) + COS(-7.796986 * PI() / 180) * COS(lat * PI() / 180) * COS((110.387938 - lon) * PI() / 180)) * 180 / PI()) * 60 * 1.1515 * 1.609344) as distance
FROM driver
HAVING distance <= 20
ORDER BY distance ASC