I've set up a successful online review system where users vote using a five star basis, amongst other things.
My question is: how would I be able to work out the average rating out of five and display it next to the product in the listing page? I know how to display a rating as a picture but I'm not sure how to do the calculation, if that's what it is?
Also, what happens when their isn't a review for the product?