calculate latitude and longitude on database code example
Example: select select lat and long
Select Id, Postcode, Lat, Lon,
acos(sin(:lat)*sin(radians(Lat)) + cos(:lat)*cos(radians(Lat))*cos(radians(Lon)-:lon)) * :R As D
From MyTable
Where Lat Between :minLat And :maxLat
And Lon Between :minLon And :maxLon
And acos(sin(:lat)*sin(radians(Lat)) + cos(:lat)*cos(radians(Lat))*cos(radians(Lon)-:lon)) * :R < :rad
Order By D