RE: [PHP-DB] Is this possible in mysql?

2002-03-08 Thread Gurhan Ozen
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

Re: [PHP-DB] Is this possible in mysql?

2002-03-08 Thread Andrey Hristov
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

RE: [PHP-DB] Is this possible in mysql?

2002-03-08 Thread Leotta, Natalie (NCI/IMS)
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