Diff for /db/prgsrc/updatedb.pl between versions 1.13 and 1.14

version 1.13, 2000/10/22 04:44:53 version 1.14, 2000/10/22 05:10:12
Line 228  MAIN: Line 228  MAIN:
     #      #
     my %QuestionFields = ('ôÉÐ'=> 'Type', '÷ÉÄ'=> 'Type',       my %QuestionFields = ('ôÉÐ'=> 'Type', '÷ÉÄ'=> 'Type', 
                           'á×ÔÏÒ' => 'Authors',                             'á×ÔÏÒ' => 'Authors', 
                           'éÓÔÏÞÎÉË' => 'Source');                            'éÓÔÏÞÎÉË' => 'Sources');
                                                       
                                               
     my($source);      my($source);
Line 239  MAIN: Line 239  MAIN:
     while ($source = shift) {      while ($source = shift) {
         my($PlayedAt) = '';          my($PlayedAt) = '';
         my($QuestionId, $TourId, $TournamentId, $ParentId) = (0, 0, 0, 0);          my($QuestionId, $TourId, $TournamentId, $ParentId) = (0, 0, 0, 0);
         my($tournum, $qnum, $all_qnum, $qtype) = (0, 0, 0, 'þ');          my($tournum, $qnum, $all_qnum) = (0, 0, 0);
         my (@d) = (localtime((stat($source))[9]))[5,4,3];          my (@d) = (localtime((stat($source))[9]))[5,4,3];
         $d[1]++;          $d[1]++;
         $d[0]+=1900;          $d[0]+=1900;
Line 253  MAIN: Line 253  MAIN:
         print STDERR "æÁÊÌ: $source, ÄÁÔÁ: $CreatedAt ";          print STDERR "æÁÊÌ: $source, ÄÁÔÁ: $CreatedAt ";
         my %TourDefaults=('CreatedAt'=>$CreatedAt);          my %TourDefaults=('CreatedAt'=>$CreatedAt);
         my %QuestionDefaults=();          my %QuestionDefaults=();
         my %QuestionGlobalDefaults=();          my %QuestionGlobalDefaults=('Type'=>$dbh->quote('þ'));
         while (($key, $value) = getField(\*INFD, $dbh)) {          while (($key, $value) = getField(\*INFD, $dbh)) {
             last if (!$key);              last if (!$key);
                           
Line 294  MAIN: Line 294  MAIN:
                     %QuestionDefaults=%QuestionGlobalDefaults;                      %QuestionDefaults=%QuestionGlobalDefaults;
                 }                  }
                 my $query = "INSERT INTO Questions                   my $query = "INSERT INTO Questions 
                              (ParentId, Number, Type)                                (ParentId, Number) 
                              VALUES ($TourId, $qnum+1, \'$qtype\')";                               VALUES ($TourId, $qnum+1)";
                 $sth = $dbh->prepare($query);                  $sth = $dbh->prepare($query);
                 $sth->execute or print $query;;                  $sth->execute or print $query;;
                 $QuestionId = $sth->{mysql_insertid};                  $QuestionId = $sth->{mysql_insertid};

Removed from v.1.13  
changed lines
  Added in v.1.14


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>