Re: [PHP-DB] Total Values with MySQL

2003-06-03 Thread Adam Voigt
SELECT SUM(ColumnName) AS total FROM table WHERE ColunName = '1'; On Mon, 2003-06-02 at 11:18, shaun wrote: Hi, Is it possible to get MySQL to total the values of a select statement, say 'SELECT ColumnName FROM Table WHERE ColumnName = '1'' Say I have three values in ColumnName all of

Re: [PHP-DB] Total Values with MySQL

2003-06-03 Thread Ronan Chilvers
Hi Shaun Comments inline... On 02 Jun,2003 at 16:18 shaun shaun wrote: Hi, Is it possible to get MySQL to total the values of a select statement, say 'SELECT ColumnName FROM Table WHERE ColumnName = '1'' Say I have three values in ColumnName all of '1' then can I get MySQL to return 3?