but i have one problem.
From time to time i'll need to delete someones rating. If i do that the rate total still shows the total rating with their vote included.
Does anyone know what reverse math to use so their vote is undone?
here's the math that adds their rating
$new_count = ($num_votes + 1); $total = $rate_total * $num_votes; $total2 = (($rate + $total) / ($new_count)); $new_rating3 = number_format($total2, 2, '.', '');