]> git.sesse.net Git - foosball/blobdiff - www/add-single-result.pl
Fixed insertion of new results again.
[foosball] / www / add-single-result.pl
index 76edbd043286c37011975375fbe977a7737e99cb..ae2b3f0eb6e55148fae066e8a68865e6176c5e94 100755 (executable)
@@ -42,9 +42,9 @@ my ($newr2, $newrd2) = foosball::calc_rating($rating2, $rd2, $rating1, $rd1, $sc
 
 $dbh->do('INSERT INTO single_results (gametime,username1,username2,score1,score2) VALUES (CURRENT_TIMESTAMP,?,?,?,?)',
        undef, $username1, $username2, $score1, $score2);
-$dbh->do('INSERT INTO single_rating (username,ratetime,rating,rd) VALUES (?,CURRENT_TIMESTAMP,?,?,?)',
+$dbh->do('INSERT INTO single_rating (username,ratetime,rating,rd,rating_diff) VALUES (?,CURRENT_TIMESTAMP,?,?,?)',
        undef, $username1, $newr1, $newrd1, $newr1-$rating1);
-$dbh->do('INSERT INTO single_rating (username,ratetime,rating,rd) VALUES (?,CURRENT_TIMESTAMP,?,?,?)',
+$dbh->do('INSERT INTO single_rating (username,ratetime,rating,rd,rating_diff) VALUES (?,CURRENT_TIMESTAMP,?,?,?)',
        undef, $username2, $newr2, $newrd2, $newr2-$rating2);
 
 $dbh->commit;