Changeset 37


Ignore:
Timestamp:
Oct 15, 2006, 8:56:31 AM (13 years ago)
Author:
Dominic Hargreaves
Message:

Store an empty string in inward rather than NULL (allows concatenation later)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/npemap.org.uk/cgi/submit.fcgi

    r28 r37  
    7777        # We are guaranteed to have the first two
    7878        $outward = $first . $second;
    79         $inward = $third if $third;
     79        $inward = '';
     80        $inward .= $third if $third;
    8081        $inward .= $fourth if $fourth;
    8182    } else {
     
    8889    # corroboration factor; this just catches accidental double-submission
    8990    # really.
    90     $sth = $dbh->prepare('SELECT * FROM postcodes WHERE raw_postcode = ? AND easting = ? AND northing = ? AND ip = ?');
     91    $sth = $dbh->prepare('SELECT raw_postcode FROM postcodes WHERE raw_postcode = ? AND easting = ? AND northing = ? AND ip = ?');
    9192    unless ($sth->execute($raw_postcode, $easting, $northing, $ENV{'REMOTE_ADDR'})) {
    9293        print_err('Database error when checking for duplicate data :(');
Note: See TracChangeset for help on using the changeset viewer.