Yes. From there I want to add all the 'a' values together using PHP. -----Original Message----- From: Justin French [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2003 12:40 AM To: Ben C. Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Addin a column of numbers not using MySQL
Do you mean something like: <? $i = 0; $sql = "SELECT a,b,c FROM foo"; $res = mysql_query($sql); while($myrow = mysql_fetch_array($res)) { $i++; echo $i."<br />"; echo $myrow['a'] ."<br />"; echo $myrow['b'] ."<br />"; echo $myrow['c'] ."<br />"; } ?> Justin On Monday, August 4, 2003, at 05:34 PM, Ben C. wrote: > How do I add a column of numbers generated through a MySQL query > without > using the SQL SUM() function? I have tried looking through the > different > documentation. I am probably missing something. > > Thanks, > > Ben > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- > [This E-mail scanned for viruses] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php