mysql variable displayed in php
| From: | Delz | Date: | Fri, 09 May 2003 06:48:12 +0000 |
| Subject: | mysql variable displayed in php | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-27603@lists.php.net to get a copy of this message | ||
Hi All,
Supposed I have a mysql table that looks like this :
+----------+----------+--------+
|Computer | Printers | total |
+---------+-----------+--------+
| 3 | 4 | 7 |
+---------+-----------+--------+
| 3 | 4 | 7 |
+---------+-----------+--------+
& have an mysql statement like this to compute the total entries in the
total column :
mysql> select @overalltotal :SUM(total) from mytable;
+-------------------------------------+
| @overalltotal := SUM(total) |
+-------------------------------------+
| 14 |
+-------------------------------------+
How do I make the value 20 appear on a php script? Hope somebody can give me
an idea.
Thanks.
Delz