I have to query a database of thousands of entries and order this by the distance from a specified point.
The issue is that each entry has a latitude and longitude a
Is this what you're looking for? http://zcentric.com/2010/03/11/calculate-distance-in-mysql-with-latitude-and-longitude/