RE: [PHP-DB] Adding Column
| From: | Chad Day | Date: | Thu, 19 Oct 2000 20:41:36 +0000 |
| Subject: | RE: [PHP-DB] Adding Column | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-3813@lists.php.net to get a copy of this message | ||
Well, you could do something in a loop like
(mysql code here)
do {
echo $row["WEIGHT"];
$TOTALWEIGHT = $TOTALWEIGHT + $row["WEIGHT"];
} while blahblah
echo $TOTALWEIGHT;
Chad
-----Original Message-----
From: Christopher King [mailto:chris@create4u.com]
Sent: Thursday, October 19, 2000 11:26 AM
To: php-db@lists.php.net
Subject: [PHP-DB] Adding Column
I have a PHP MYSQL form that returns rows from a query on the date.
I have a field that holds the item's weight. After the user chooses to
display a series of products by date I want to display a total weight of
those items in a separate table below the returned rows.
How do you sum columns.
Thanks
--
Christopher King
chris@create4u.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net