Changeset 169 for trunk/npemap.org.uk
- Timestamp:
- Oct 24, 2006, 8:06:02 PM (14 years ago)
- Location:
- trunk/npemap.org.uk/cgi
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/npemap.org.uk/cgi/bad-postcode.fcgi
r82 r169 49 49 50 50 # Check that the requested ID exists 51 my $sth = $dbh->prepare('SELECT id FROM postcodes WHERE id = ? ');51 my $sth = $dbh->prepare('SELECT id FROM postcodes WHERE id = ? AND NOT deleted'); 52 52 unless ($sth->execute($cgi->param('postcode'))) { 53 53 print_err('Database error when checking for the postcode', $returnlink); … … 56 56 57 57 unless ($sth->rows) { 58 print_err('A postcode with that identifier does not exist .', $returnlink);58 print_err('A postcode with that identifier does not exist, or has already been deleted.', $returnlink); 59 59 next REQUEST; 60 60 } -
trunk/npemap.org.uk/cgi/get-postcodes.fcgi
r84 r169 73 73 } 74 74 75 my $sth = $dbh->prepare("SELECT outward || ' ' || inward AS postcode, easting, northing,id FROM postcodes WHERE easting BETWEEN ? AND ? AND northing BETWEEN ? AND ? ");75 my $sth = $dbh->prepare("SELECT outward || ' ' || inward AS postcode, easting, northing,id FROM postcodes WHERE easting BETWEEN ? AND ? AND northing BETWEEN ? AND ? AND NOT deleted"); 76 76 77 77 if ($sth->execute($cgi->param('mineasting'), $cgi->param('maxeasting'), $cgi->param('minnorthing'), $cgi->param('maxnorthing'))) { -
trunk/npemap.org.uk/cgi/submit.fcgi
r140 r169 119 119 # corroboration factor; this just catches accidental double-submission 120 120 # really. 121 $sth = $dbh->prepare('SELECT raw_postcode_outward FROM postcodes WHERE raw_postcode_outward = ? AND raw_postcode_inward = ? AND easting = ? AND northing = ? AND ip = ? ');121 $sth = $dbh->prepare('SELECT raw_postcode_outward FROM postcodes WHERE raw_postcode_outward = ? AND raw_postcode_inward = ? AND easting = ? AND northing = ? AND ip = ? AND NOT deleted'); 122 122 unless ($sth->execute($cgi->param('postcode1'), $cgi->param('postcode2'), $easting, $northing, $ENV{'REMOTE_ADDR'})) { 123 123 print_err('Database error when checking for duplicate data :(', $returnlink);
Note: See TracChangeset
for help on using the changeset viewer.