Get The Summation Of The Column

hey guy Im totaly new to yii;

Id name email salary

1 aaa aaaa 2500

2 bbb bbbb 1500

Can anyone give me the idea to getting total value of the salary.plz help me. Thank you

how do i calculate total salary the database table like that in yii.pls help me.give me some ideas to solve that.plssssssssssssss

Hi,

try this

SELECT SUM(columnname) FROM tablename where id in ($ids)