Re: Addin a column of numbers not using MySQL
| From: | Justin French | Date: | Mon, 04 Aug 2003 07:40:15 +0000 |
| Subject: | Re: Addin a column of numbers not using MySQL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-158123@lists.php.net to get a copy of this message | ||
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]