RE: [PHP] Average Number For Math Functions

From: Date: Fri, 30 Aug 2002 03:27:12 +0000
Subject: RE: [PHP] Average Number For Math Functions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-114587@lists.php.net to get a copy of this message
> Ok so how do I sum up an entire column in my db? > For example if one row is : 1 , the next is 2, and the next > is 1 - I need to > have a total of 4 and the be able to divide by the num_rows > > The problem I ma having is the "inside" row addition If you're doing it on values from a database column then you're probably best off doing it as a part of your database query. If you're using MySQL then consult chapter 6 of the manual for all sorts of useful functions that can be used in a query. CYA, Dave

« previous php.general (#114587) next »