Zipcode Distance Problem
Posted: Mon Jan 17, 2005 9:37 am
I am developing an app that gets a zipcode from a user and then uses that zipcode to find the nearest store locations in miles based on the stores zipcode.
I have a database that has all the zipcodes with there corresponding latitudes and longitudes.
I also have a calculation that computes distance between the zipcodes.
The problem I am facing is that I need the result to be sorted by distance. The issue at hand is that distance is calculated on the fly and how do I sort something that is computed on the fly by a PHp function.
Any help will be highly appreciated.
I have a database that has all the zipcodes with there corresponding latitudes and longitudes.
I also have a calculation that computes distance between the zipcodes.
The problem I am facing is that I need the result to be sorted by distance. The issue at hand is that distance is calculated on the fly and how do I sort something that is computed on the fly by a PHp function.
Any help will be highly appreciated.