I have a column of data returned from my database and I’d like to know how to get the sum for the entire column. Can someone tell me if there is a built in function for this?
123.00
12.00
1.00
-----
136.00 < this is what I need.
Please see the accompanying post for the mysql portion of my code.
How to get the total sum for a column
in mysql you can return all this values in a
sum()function, If important to you also all values and the total amountif you store this in array
in php u can use
array_sum