For some reason, the loop in the code below isn't working. It is only editing the first row in the table, not all the rows.
<?
require ( "connection-file.php" );
$teams_rs = $conn->Execute ( "SELECT * FROM wv_tm_test ORDER BY tm_id ASC" ) or die ( $conn->ErrorMsg() );
$team_rating = $teams_rs->Fields("tm_rating");
$team_id = $teams_rs->Fields("tm_id");
while ( ! $teams_rs->EOF ) {
$team_rated = $team_id;
$new_rating = $team_rating - 0.346 + 0.5;
$new_rating_1 = number_format($new_rating, 3, '.', '');
$sql = "UPDATE wv_tm_test SET tm_rating = '$new_rating_1' WHERE tm_id = '$team_rated'";
$add_rating_rs = $conn->Execute($sql) or die ( $conn->ErrorMsg() );
$teams_rs->MoveNext(); } ?>