]> git.sesse.net Git - ccbs/commitdiff
Add people to roundparticipations as we go.
authorSteinar H. Gunderson <sesse@samfundet.no>
Sun, 13 Feb 2005 18:16:01 +0000 (18:16 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Sun, 13 Feb 2005 18:16:01 +0000 (18:16 +0000)
parse/parse-ddreurope-tournament.pl

index d2d06ee0becf41f93779b00f899b34d2f6afd246..ad3fe0776b20f38275146f99b547cbbc90f2718b 100644 (file)
@@ -92,6 +92,11 @@ while (<>) {
        if (/^ <tr><td \s* class=dtd> .*? class="link"> (.*?) <\/a> $/x) {
                $player = $1;
                printf "INSERT INTO players (nick) VALUES ('%s');\n", $player;
        if (/^ <tr><td \s* class=dtd> .*? class="link"> (.*?) <\/a> $/x) {
                $player = $1;
                printf "INSERT INTO players (nick) VALUES ('%s');\n", $player;
+               printf "INSERT INTO roundparticipation (tournament, round, parallel, player) VALUES (\n";
+               print "   (SELECT tournament FROM tournaments WHERE name='$name'),\n";
+               print "   $round, $group,\n";
+               print "   (SELECT player FROM players WHERE nick='$player')\n";
+               print ");\n";
        }
 
        # Player's results (score)
        }
 
        # Player's results (score)