I have a MySQL table in a PHP webservice containing longitude and latitude.
I want to send the user only the, let\'s say, 5 closest coordinates.
I wrote the method which cal
It is more efficient to embed the sort in the query.
This wonderful tutorial will help you (and provides a query that serves your needs):
https://developers.google.com/maps/articles/phpsqlsearch_v3#findnearsql