Build a Ranking
php
Solution
Have you considered using a weighted bayesian rating system? It'll weight the results based on the number of votes and the vote values themselves.
Problem
I have a newssystem where you can rate News with 1 to 5 stars. In the Database i save the count, the sum and the absolute rating as int up to 100 (for html output, so 5 stars would be 100 1 star would be 20percent. Now i have three toplists: Best Rated Most viewed Most commented Last two ones are simple, but the first is kinda tricky. Before i took that thing over it was all a big mess, and they just put the 5 best rated news there, so in fact if there was a news rated 4.995 with 100k votes and another one with 5 stars at 1 vote, the "better rated" one is on top even if that is obv ridiculous. For the first moment i capped the list so only news with a certain amount of votes (like 10 or 20) can be in the list. But i do not really like that. Is there a nice method to kind-a give those things a "weight" with the count or something like that?