I tried the code again and still returns a '0'. It looks like the while() is only looping one record at a time. It does looks like it is add all the records. Do you or anyone have any other suggestions?
> > From: "Jay Blanchard" <[EMAIL PROTECTED]> > Date: 2003/08/04 Mon PM 02:16:22 EDT > To: "Ben C." <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> > Subject: RE: Re: [PHP] Addin a column of numbers not using MySQL > > [snip] > while ($row = mysql_fetch_array($result_2)) { > $paid = $row['paid']; > } > ----CODE End----------------- > > What I want to do from here is add up all the 'paid' figures. > [/snip] > > while ($row = mysql_fetch_array($result_2)) { > $paid = $row['paid']; > $total = $total + $paid; > } > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php