--- db/prgsrc/updatedb.pl 2002/01/12 00:55:33 1.22 +++ db/prgsrc/updatedb.pl 2002/01/15 03:34:31 1.24 @@ -22,7 +22,7 @@ The database, user and password are hard Dmitry Rubinstein -=head1 $Id: updatedb.pl,v 1.22 2002/01/12 00:55:33 roma7 Exp $ +=head1 $Id: updatedb.pl,v 1.24 2002/01/15 03:34:31 roma7 Exp $ =cut @@ -67,6 +67,7 @@ sub getField { s/[ ]//g; if ($key && /^\s*$/) { chomp $value; + $value =~ s/\s+$//; chomp $key; if ($key eq 'δΑΤΑ') { $value =~ s/^(.*)-(.*)-(.*)$/$3-$2-$1/; @@ -90,6 +91,7 @@ sub getField { } } if ($key && $value) { + $value=~s/\s+$//; $value = $dbh->quote($value); return ($key, $value); } @@ -135,7 +137,6 @@ sub UpdateTournament { sub UpdateQuestion { my ($dbh, $QuestionId, $field, $value) = @_; - $value=~s/\s*$//; $dbh->do("UPDATE Questions SET $field=$value WHERE QuestionId=$QuestionId") or die $dbh->errstr;