I\'ve got an sqlite db with long and lat of shops and I want to find out the closest 5 shops.
So the following code works fine.
if(sqlite3_prepare_v2
The fastest way to find nearby locations in SQL is to use the Haversine formula in an SQL query. Do a Google search for sqlite and Haversine and you'll find an implementation.
Here's one I've used before:
http://www.thismuchiknow.co.uk/?p=71