Re: mysql variable displayed in php
| From: | Delz | Date: | Fri, 09 May 2003 06:53:06 +0000 |
| Subject: | Re: mysql variable displayed in php | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-27604@lists.php.net to get a copy of this message | ||
correction the value should be 14 not 20, my mistake......
----- Original Message -----
From: "Delz" <phpuser@modeglobal.com>
To: <php-db@lists.php.net>
Sent: Friday, May 09, 2003 2:48 PM
Subject: [PHP-DB] mysql variable displayed in php
> 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
>
>
>