--- db/prgsrc/updateindex.pl 2003/04/14 20:06:59 1.9 +++ db/prgsrc/updateindex.pl 2008/11/14 11:23:03 1.12 @@ -58,7 +58,7 @@ createindex.pl(1) Boris Veytsman -=head1 $Id: updateindex.pl,v 1.9 2003/04/14 20:06:59 roma7 Exp $ +=head1 $Id: updateindex.pl,v 1.12 2008/11/14 11:23:03 roma7 Exp $ =cut @@ -93,7 +93,7 @@ MAIN: my $filename; my($dbh) = DBI->connect("DBI:mysql:chgk", "piataev", "") or die "Can't connect to DB chgk\n"; - +if ($dbh->get_info( 18 )=~/^(5|(4.1))/) {$dbh->do("SET NAMES 'koi8r'");} if ($source) { open INFO, $source or die "Can't open input file: $!\n"; } else { @@ -139,9 +139,9 @@ MAIN: $dbh->do("DELETE FROM Tournaments WHERE QuestionsNum=0"); } $dbh->do("INSERT INTO Tournaments - (Id, Title, ParentId, Type) + (Id, Title, ParentId, Type,CreatedAt) VALUES - (9999, 'Несортированные турниры', 0,'Г')"); + (9999, 'Несортированные турниры', 0,'Г',NOW())"); $dbh->disconnect; } @@ -192,9 +192,9 @@ sub CheckId { } else { $sth = $dbh->prepare("INSERT INTO Tournaments - (Title, ParentId, Type) + (Title, ParentId, Type,CreatedAt) VALUES - ($title, $ParentId,$type)"); + ($title, $ParentId,$type,NOW())"); } $sth->execute or die $dbh->errstr; if (!$Id) {