I am working on my first app, and want to make a list that will pull venues from a database and then sort them by distance from the user positions. I haven't done the coding to get the users position but know there are plenty of tutorials for that, and for now can just use a fixed arbitrary point.
What I need help with is calculating the distance and then using the distances to build the list. I am making the database from scratch so I can use Lat, Long for position or anything else, for instance if addresses would be a useful(I figured lat, long was the most straight forward).
I don't know where to begin as I am not familiar with SQL to know if there would be any way to query such a thing. Then in terms of sorting it, the database doesn't have a distance column (yet, but could if you would recommend it) and it would need to be updated every time the user moved. My other thought is to convert the cursor into an array and then just create the distance variable that way.
I hope I have described my problem in enough detail and apologize for not providing any code. Thanks to everyone in advance for recommending methods to approach this.