Changeset 481


Ignore:
Timestamp:
Mar 14, 2007, 7:42:30 PM (14 years ago)
Author:
Dominic Hargreaves
Message:

order by distance

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/npemap.org.uk/cgi/get-distant-postcodes.fcgi

    r479 r481  
    7676        $sql .= "       abs(avg_easting-easting) > $flag_distance ";
    7777        $sql .= "       OR abs(avg_northing-northing) > $flag_distance ";
    78         $sql .= ") ORDER BY outward, inward ";
     78        $sql .= ") ORDER BY (abs(avg_easting-easting)+abs(avg_northing-northing)) DESC, outward, inward ";
    7979
    8080        # Build the temp table
Note: See TracChangeset for help on using the changeset viewer.