I have a MySQL table with rows latitude
, longitude
and radius
. Latitude and longitude are of type DOUBLE
; radius
is of type INT
and measured in meters. Essentially, each row represents a circle on Earth.
Given values of user_latitude
and user_longitude
, how can I select all the rows that include the user in their circles?
I made a quick diagram to illustrate in case my question wasn't clear. Each red dot represents a user_latitude
and user_longitude
point, each circle represents a latitude
, longitude
and radius
row in the database.