How to set a PHP variable equal to the sum of all entries in a column?

Bear

New member
I am trying to set a variable equal to the sum of all of the entries in a column in my table from a sql database.
I try setting it equal to the query itself but this sets what I want to be a numerical value as a resource id. I run the query through the SQL browser and it returns the value i expect, but in my code i wanna know how to set it equal to this value.
 
Back
Top