Adding values from a column in MySQL
Posted: Fri Jun 20, 2003 11:06 pm
Does anyone know how to add all of the values in a column. I suppose you could use mysql_fetch_array but i was wondering if there were a easier way. thanks
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
SELECT SUM(column_name) FROM table_name;