> The solution was to step further back and > do the math in the mysql query as in: > > sum(rating)/count(rating) as avg_rating, you could also have done it this way: ... AVG(rating) AS avg_rating ;o)