+ undef, $tournament, $round, $gg, $ref->{'song'});
+
+ $dbh->do('INSERT INTO scores SELECT tournament,round,parallel,player,?,?,\'single\',\'expert\',\'f\',NULL FROM roundparticipation WHERE tournament=? AND round=? AND parallel=?', undef,
+ $s, $ref->{'song'}, $tournament, $round, $gg);
+ }
+}
+
+# Add empty "score" records for the chosen songs.
+for my $g (1..$num_groups) {
+ my $gg = ($num_groups == 1) ? 0 : $g;
+
+ for my $s (1..$num_chosen) {
+ $dbh->do('INSERT INTO scores SELECT tournament,round,parallel,player,?,NULL,\'single\',\'expert\',\'t\',NULL FROM roundparticipation WHERE tournament=? AND round=? AND parallel=?', undef,
+ $s + $num_random, $tournament, $round, $gg);