[PHP-DB] SUM(colname)

2003-01-17 Thread Cesar Aracena
Hi all, I'm trying to add all the values from the same column in MySQL with a query like this: SELECT SUM(colname) WHERE value = 'value' But then I can't output it on the screen correctly. I've tried to put all the results into an array and then make an array_sum($arrayname) and it gives me

RE: [PHP-DB] SUM(colname)

2003-01-17 Thread Aaron Wolski
Select SUM(colname) as newColName FROM SomeTable WHERE value='value'; Reference the 'newColName' as your variable. Aaron -Original Message- From: Cesar Aracena [mailto:[EMAIL PROTECTED]] Sent: January 17, 2003 2:17 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] SUM(colname) Hi all, I'm