I have "Places" stored in a database and I am using PHP to access them. What I want to do is to return all Places sorted by distance relative to a certain place.
This place will be dynamic from an Android application, i.e. I want to display all places closest to the user's location.
What would be the best way to do this? Would it be effective/efficient to retrieve ALL places in PHP into an array, calculate the distance for each place, and then sort that array by distance? Or is there an easier/faster way to accomplish what I need?
Thanks!