RE: [PHP] Couple of small questions
| From: | Lawrence dot Sheed at dfait-maeci dot gc dot ca | Date: | Mon, 20 Nov 2000 09:36:26 +0000 |
| Subject: | RE: [PHP] Couple of small questions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-26220@lists.php.net to get a copy of this message | ||
select sum(gram) from my_table maybe?
-----Original Message-----
From: jeremy brand [mailto:jeremy@nirvani.net]
Sent: November 20, 2000 05:34 PM
To: Website4S@aol.com
Cc: php-general@lists.php.net
Subject: Re: [PHP] Couple of small questions
> Need some help with some math stuff. Firstly, what is the best method for
> obtaining the number of records stored in a db table?
SELECT count(*) from tablename;
> and secondly in a table
> I am storing a value under the name Gram every time a record is added this
> value is different what I am trying to do is select all the records take
Gram
> from each record and add them all together, any ideas.
I'm not quite following you.
-jeremy brand
Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: jeremy@nirvani.net
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html
for more
- - - - - - - - - - - - - - - - - - - - - - - - -
I am pleased to see that we have differences. May we together become
greater than the sum of both of us.
-- Surak of Vulcan, "The Savage Curtain", stardate 5906.4
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net