mysql variable displayed in php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux