Changeset 325


Ignore:
Timestamp:
Nov 5, 2006, 12:42:23 PM (13 years ago)
Author:
Nick Burch
Message:

Optionally, limit to just working on one postcode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/npemap.org.uk/scripts/process-problems

    r320 r325  
    1010use NPEMap;
    1111
     12# Optionally, limit by the postcode ID
     13my $postcode_id = shift;
     14my $postcode_where = "";
     15if($postcode_id && $postcode_id =~ /^\d+$/) {
     16        $postcode_where = " AND p.id = $postcode_id ";
     17}
     18
     19# Get the postcodes
    1220my $dbh = setup_dbh() or die $!;
    1321
     
    1725         p.easting, p.northing
    1826FROM     bad_postcodes AS b INNER JOIN postcodes AS p ON (b.postcode = p.id)
    19 WHERE    not b.actioned
     27WHERE    not b.actioned   $postcode_where
    2028ORDER BY p.id, b.created_at
    2129EOF
Note: See TracChangeset for help on using the changeset viewer.