Adding Values In One Column From Query ResultsNov 27, 2001
I have this query:
sum(field_value) as totalValue
WHERE field_id = $id
GROUP BY field_group
the data type of field value is a decimal value, with values such as 125.00 and 150.50 stored in each record. My goal is to have totalValue be the total value of those numbers. So if I have two records that equal 125.00 and 150.50 totalValue would = 175.50.
the above query does not do this. What do I need to change here? Should I try to do this from the PHP side?