I have a DB Schema like this (from this tutorial by Google) -
So the actual points in a graph for them is like this-
What I want is to find points near a given point (by point_id) point ordered by distance
Location of a point
(x,y)
is (point_x
,point_y
) in DB
I want to solve it with MySQL because my DB is already in MySQL.
Update-
Finding distance of 2 points is so easy like this-
I want to sort on distance with MySQL.
Re-
For removing the confusions, I want the points inside the circle, later. But now I want to find only the sorted points.
So u can ignore the circles.
I don't have any idea how to do it, can anyone please help?
nearest points
? – Walkling