I have this query:
SELECT field_1, sum(field_value) as totalValue
FROM table_name
WHERE field_id = $id
GROUP BY field_value
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?
Any assistance is appreciated.