RE: [PHP] math calculations query
| From: | Maxim Maletsky | Date: | Fri, 27 Apr 2001 02:59:28 +0000 |
| Subject: | RE: [PHP] math calculations query | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-50548@lists.php.net to get a copy of this message | ||
SELECT
SUM(quantity)*SUM(total) As mySUM
FROM
table
WHERE
...
Sincerely,
Maxim Maletsky
Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
maxim@phpbeginner.com
www.phpbeginner.com
-----Original Message-----
From: sean@networkdata.co.uk [mailto:sean@networkdata.co.uk]
Sent: Friday, April 27, 2001 4:31 AM
To: php-general@lists.php.net
Subject: [PHP] math calculations query
hi all,
i have a script which selects description, price and quantity from a mysql
table.
i have displayed the results on a page in the form of description, price,
quantity but I was wondering how best to go about calculating a total total,
ie. sum of quantitys multiplied by sum of prices.
Any ideas?
Many thanks,
Sean.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net