i'm building a website that contains a database of places, and in the MySQL database i have stored the latitude and longitude of a certain place. When loaded, I then calculate the distance between the user (user's location is aquired via HTML5 Geolocation) and the stored location using either the haversine formula or google maps api's DistanceMatrix.
What I want is to order the output from the closest to the farthest location. Is that possible using a mysql query, or i can only do it with javascript?