You could also do a select sum(counter) from ....
or, if the db supports it, select avg(...) from ...
Saves you the trouble of counting.
Robert Klinkenberg

> Verzonden:    Wednesday, August 15, 2001 6:48 PM
> CC:   PHP-DB
> Onderwerp:    Re: [PHP-DB] Averaging Numbers
> Maybe I am missing the complexity but I would just add them all up as 
> you retrieve them (or where you are printing them out) and then when you 
> finish the loop divide the total by the number of of number you are 
> averaging over have (i.e this would be 15 if you are taking 15 days).

PHP Database Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to