My database has a list of coordinates and I need to build an API for a mobile app, one of the methods the app will send me the current lat/long and I have to retrieve the nearby locations based on my database.
The thing is, how can I do this? I only find methods with MySQL, but it’s good for performance.
I’m using PHP with Symfony2 framework.
EDIT:
I’m using MySQL, but I’ll have thousands of records and I did some perfomance tests that were very slow.
Would it be feasible to change to use PostgreSQL instead?
I only mention it because it has the functionality that you’re looking for, so would probably be far more efficient for this use case. See: geocodable behaviour for Doctrine2 (or the Propel equivalent)