Hi. I have a database called ratings and I have a field called SCORES. Basically people rate stuff and their votes are added to the database. To get an average result I add all the scores together amnd divide by the number of rows. My code is: (i have missed the mysql connection stuff out)
$scoresquery = mysql($DATABASE, "Select * from
ratings");
$result = mysql_query($scoresquery);$num_rows = mysql_num_rows($scoresquery);while($myrow =
mysql_fetch_array($scoresquery))$scores = $myrow[score];echo $scores/$num_rows;
Basically my problem lies with the adding of the $myrow[scores]. I can't get them all to add up unless I do $myrow[scores]+$myrow[scores]+$myrow[scores] etc. How can this be solved??