Re: pulling numbers from a column and getting a total

From: Date: Wed, 26 Jul 2006 14:06:25 +0000
Subject: Re: pulling numbers from a column and getting a total
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-42258@lists.php.net to get a copy of this message
I just reread your question and realized that you said you're already displaying each number, so instead you might be better off with a variable that you initialize to 0 and then in each iteration of your for loop add on that value. Natalie On 7/26/06, Natalie Leotta <nleotta@gmail.com> wrote:
http://www.techonthenet.com/sql/sum.php That should help, Dave! Natalie On 7/26/06, Dave W <dabbaking@gmail.com> wrote: Hi, I was just wondering on how I could get a whole column full of integers and added them up and display that total? I currently use a for loop to display the whole column in a table, but I wanted to add all those numbers up. Thanks. -- Dave W -- Natalie Leotta Independent Consultant Arbonne International 607-785-2151 http://www.arbonne.com/
-- Natalie Leotta Independent Consultant Arbonne International 607-785-2151 http://www.arbonne.com/

« previous php.db (#42258) next »