php - Sum of the columns mysql -
php - Sum of the columns mysql -
this question has reply here:
sum 2 columns in 2 mysql tables 2 answersi have situation this:
- name value ------------- - stuff_1 2 - stuff2 5 - stuff2 3 - stuff_1 4
which mysql query have utilize in order sum these values , this:
- name value ------------- - stuff_1 2+4=6 - stuff2 5+3=8
you need this:
select name, sum(value) table_name grouping name
take @ mysql group by , aggregation functions listed there
php mysql sum
Comments
Post a Comment