In addition to the above suggestion, to create correct ratings, your DB will need at least another field: number_of_votes.
The field 'rating' should contain the sum of all votes received. The average is then easily calculated:
PHP Code:
$old_rating = db_results['rating']; //current average rating
$old_votes = db_results['number_of_votes']; //number of people that have voted until now.
$current_rating = user_input['rating']; //the rating the current user has entered
$new_votes = $old_votes+1; //the number of votes after the new rating.
$new_rating = $old_rating + $current_rating;
// you can now insert $new_rating and $new_votes into the DB.
And you can use: $average = $new_rating / $new_votes to display the current standings.
Now this will result in large numbers in your table (the total points awarded will get big real quick). If that's not what you want (for ordering the table perhaps) you can also store the average into the table. But you'll need to calculate the total points awarded whenever a new vote is added....