0

I have a scenario, I have users along with there address lat lng in my MySQL database, Now I need to get all the users who are within 2 km away from me (me as my lat lng ) I have one solution as I will get all the user's lat lng and apply #haversineformula and calculated distance and figure out all who are within 2km. Is there any good approach as I don't want to fetch all the users and filter out them. If there is something I can do within MySQL only using some sort of query. Appreciate any help

0 Answers0