version 1.37, 2004/01/07 14:31:31
|
version 1.41, 2005/12/10 00:03:55
|
Line 175 sub UpdateTournament {
|
Line 175 sub UpdateTournament {
|
|
|
sub UpdateQuestion { |
sub UpdateQuestion { |
my ($dbh, $QuestionId, $field, $value) = @_; |
my ($dbh, $QuestionId, $field, $value) = @_; |
|
|
|
if (($field eq 'Type') && ($value eq "'ä'")) { |
|
$value = "'þä'"; |
|
} |
$dbh->do("UPDATE Questions SET $field=$value |
$dbh->do("UPDATE Questions SET $field=$value |
WHERE QuestionId=$QuestionId") |
WHERE QuestionId=$QuestionId") |
or die $dbh->errstr; |
or die $dbh->errstr; |
Line 277 MAIN:
|
Line 281 MAIN:
|
|
|
my($dbh) = DBI->connect("DBI:mysql:chgk", "piataev", "") |
my($dbh) = DBI->connect("DBI:mysql:chgk", "piataev", "") |
or die "Can't connect to DB chgk\n"; |
or die "Can't connect to DB chgk\n"; |
|
$dbh->do("SET NAMES 'koi8r'"); |
my @sources; |
my @sources; |
open UNSORTED, ">$unsortedname"; |
open UNSORTED, ">$unsortedname"; |
while ($source = shift) { |
while ($source = shift) { |
Line 384 MAIN:
|
Line 389 MAIN:
|
&UpdateQuestion($dbh, $QuestionId, "Comments", $value); |
&UpdateQuestion($dbh, $QuestionId, "Comments", $value); |
next; |
next; |
} |
} |
|
|
|
|
|
|
my @Fields = grep { $key =~ /$_/ } keys %QuestionFields; |
my @Fields = grep { $key =~ /$_/ } keys %QuestionFields; |
|
|