View Single Post
Old January 30th, 2008, 06:17 PM   #5 (permalink)
damon18
Member
Verified Customer
 
Join Date: Feb 2007
Posts: 110
It seems like you already have most of the calculations to do this, just need to store the calculated distances in an array or temp table and sort on that.

Sorting the results of a distance search is basic expected result. See any "store locater" type script, the results wouldn't be near as good if they worked like Classifieds.

Here's an example, try the zip search for Radio Shack stores here.
http://www.zipcodeworld.com/storelocatorphp.htm

If you decide it's too difficult to provide distance sort in the "sort by" drop down list, at least sort the results that come from advanced search in the "sort by distance" section, which finds the results within a selected distance, but ironically doesn't "sort by distance" at all.

Thanks,

Damon
damon18 is offline   Reply With Quote