I doing an iPhone application which has an external database in this case i am using mySql.
i wan to store coordinates into the database and later i want to search the database using a coordinates to return only the coordinates that are near to the coordinates i am querying.
Example
-----------------
Database |
-----------------
1- Coordinate A |
2- Coordinate B |
3- Coordinate C |
-----------------
search using Coordinate D lets say coordinate A and Coordinate C are near to Coordinate D lets say with 5KM radius distance then my query result to show Coordinates A, Coordinates C and ignore Coordinate B as it is not near to Coordinate D
Does anyone have any idea on What format should my database be in ? How to query the database for near by coordinates ?