Re: mysql variable displayed in php

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

 



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:  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
>
>
>



-- 
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