Yii Framework Forum: Get The Summation Of The Column - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Get The Summation Of The Column

#1 User is offline   sldra 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 123
  • Joined: 11-October 12

Posted 05 March 2013 - 11:37 AM

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
0

#2 User is offline   chandran 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 488
  • Joined: 08-October 12
  • Location:Austria

Posted 19 May 2014 - 03:06 AM

Hi,

try this
SELECT SUM(columnname) FROM `tablename` where id in ($ids)
Thanks
chandran nepolean

My own extension:
http://www.yiiframew...sion/ejqueryte/

My wiki
http://www.yiiframew...checkboxcolumn/

If it work dont hesitate to click +1 button
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users