Leif,
IF i understood this correctly you would like to add up the values of a
particular column and return it to PHP with a different name right?
You can do:
$query="select sum(column_name) as nameyouwant from tablename"; // this will
return the sum of the column in a column called nameyouwant
$r
list($sum)=mysql_fetch_assoc(mysql_query('SELECT SUM(salary') FROM employes;'));
Best regards,
Andrey Hristov
On Friday 08 March 2002 09:17 pm, you wrote:
> I need to add up the (integer) values of columns, and return the added up
> value as one column to php. Is this possible? Or is there som
Here's an example for how to select the sum of a column in SQL. Maybe that
will help.
-Natalie
http://www.devguru.com/Technologies/jetsql/quickref/sum.html
> -Original Message-
> From: Leif K-Brooks [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, March 08, 2002 2:17 PM
> To: [EMAIL PROTECTE