you're best bet would be to psuedo cache the data
in the while have
$count++
$row[$count] = $totalteamposts
then outside of the while add up the data from $row[0] -> $row[10] and beneath that to the update
saying that, not being sure if you can do that, it might now work.
actually ignore that, i know it's simpler than that, i'll have to come back to this, my minds gone blank
ahhh that's it try
$totalteamposts .= $teamposts[posts] . " + ";
then just remove the extra " + " at the end and throw it into a ceil()
|