Changeset 199


Ignore:
Timestamp:
Oct 26, 2006, 11:00:00 PM (13 years ago)
Author:
Nick Burch
Message:

Include ID to, so we can report it as bad

File:
1 edited

Legend:

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

    r198 r199  
    7272
    7373        # Then join to find problem ones
    74         my $sql .= "SELECT outward || ' ' || inward AS postcode, $pcpart AS pcpart, easting, northing, avg_easting, avg_northing, id FROM postcodes ";
     74        my $sql .= "SELECT id, outward || ' ' || inward AS postcode, $pcpart AS pcpart, easting, northing, avg_easting, avg_northing FROM postcodes ";
    7575        $sql .= "INNER JOIN averages ON ($pcpart = pcpart) ";
    7676        $sql .= "WHERE abs(avg_easting-easting) > $flag_distance ";
     
    8686        print "Content-type: text/javascript\n\n";
    8787
    88                 print "// postcode, match part, easting, northing, avg easting, avg northing\n";
     88                print "// id, postcode, match part, easting, northing, avg easting, avg northing\n";
    8989        while(my @row = $sth->fetchrow_array) {
    9090                        # Tidy up avg
    91                         my $avg_e = int($row[4]);
    92                         my $avg_n = int($row[5]);
     91                        my $avg_e = int($row[5]);
     92                        my $avg_n = int($row[6]);
    9393
    9494                        # Print
    95                         print "addProblem('$row[0]','$row[1]', $row[2], $row[3], $avg_e, $avg_n);\n";
     95                        print "addProblem($row[0],'$row[1]','$row[2]', $row[3], $row[4], $avg_e, $avg_n);\n";
    9696        }
    9797    } else {
Note: See TracChangeset for help on using the changeset viewer.