I have a news system where you can rate news from 1 to 5 stars. In the database I save the score, amount and absolute rating as int up to 100 (for html output, so 5 stars will be 100 1 star will be 20%. Now I have three fat people: Best ratings Most viewed Most commented
The last two are simple, but the first one is quite complex. Before I took this thing, it was a big mess, and they just posted the 5 best rated news, so in fact, if there is news with a rating of 4.995 with 100 thousandth vote, and another one with 5 stars for 1 vote, then the "better rating" is one on top, even if it is obv funny. At the first moment, I closed the list, so the list can only contain news with a certain number of votes (for example, 10 or 20).
But I don’t really like it. Is there a good way to do good - give these things a “weight” with a score or something like that?
source
share