Ok the 3 fiels are columns, Animation, Plot and Characters, now the poeple give a score out of ten for each of these then the average of the scores are put together to get their overall score of the Anime. Now if only one person reviews teh anime there will only be one row, however if say 3 people review it there will be 3. So I wanted to know a way to figure out the total average, like say the first reviews average is 10, the 2nd was 9 and the third was 9 then I would want the total Overall score to be 9.3.
Now my problem is more the fact that I am very new to PHP and thus I do not understand how to implement the script you are talking about to get what I need accomplished. (that being implemented into the script I currently have below):
<?php
$query = @mysql_query("SELECT * FROM animereview WHERE animeid = '$id' ORDER BY id");
while ($data = @mysql_fetch_object($query)) {
?>
<table width="100%" cellpadding="1" cellspacing="0" border="0" id="con">
<tr>
<td width="90%"><b>Field 2:</b></td>
<td width="10%"><?php echo $data->field2; ?></td>
</tr>
<tr>
<td width="90%"><b>Field 3:</b></td>
<td width="10%"><?php echo $data->field3; ?></td>
</tr>
<tr>
<td width="90%"><b>Overall:</b></td>
<td width="10%"><?php
$overall = $data->field1 + $data->field2 + $data->field3;
echo round($overall / 3, 1);
?></td>
</tr>
</table>
<br>
<?php
}
?>
Also a way to inplement was Lightsaber mentioned would also be helpful as I would like it to display a result of 0 if no one has reviewed the anime.