$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;