Re: suming up in MySQL
| From: | Andrew Perevodchik | Date: | Tue, 11 Sep 2001 10:10:28 +0000 |
| Subject: | Re: suming up in MySQL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-66901@lists.php.net to get a copy of this message | ||
TM> id - price
TM> 1 1000
TM> 2 300
TM> 3 200
TM> How to sum up price row ?
This can be done by MySQL rather than PHP.
mysql_query ("SELECT SUM (price) FROM table");
--
Andrew Perevodchik
ok@naverex.kiev.ua