I would like to search for records within a given distance like 10km. i have a table called users with username, userid, lat and lon as fields.
I would like to return all the users within 10km from say user number 15 and then order the records from nearest to farthest. I would like to do this in the most economic way possible so I believe that means doing all the calculations within the mysql query.
does anyone know how to accomplish this this?