Sum in array with match value
- by user325504
Dear all, I would like to do a simple sum per salesid in php - mysql after cross calculation between date (2 table) to get the real time commission, all the value already come out correctly but I got problem with final sum per sales id.
salesid-commission
aa0001 - 1000
bb0001 - 500
aa0001 - 200
bb0001 - 50
I already try with few sample in this web but still cannot meet the correct result. I cannot do the sum in mysql because of some reason (need calculation with other table)
the result will be:
aa0001 - 1200
bb0001 - 550
I aprreciated for any help to complated the test. Thank you so much.