I need to find toilets around me, say within 50KM, and I have my position in term of latitude and longitude, toilets in database looks like:
Toilet ID (primary)
Address
Latitude
Longitude
my location: my_lat, my_lon
is it possible to construct a statement that returns all toilets within 50KM of (my_lat, my_lon)? Something like
select * from ToiletTable where
SQRT((Latitude - my_lat)^2 + (Longitude - my_lon)^2) < 50
Thanks!