Jump to content


Photo

how to get sum of one mysql table column?


  • Please log in to reply
2 replies to this topic

#1 shams

shams
  • Members
  • PipPipPip
  • Advanced Member
  • 42 posts

Posted 08 May 2006 - 03:34 PM

hi,
i want to get the sum of the integers of one column of the mysql table, can any one post the code please, then i can put it in a php code, thanks in advanced for your help.

#2 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 08 May 2006 - 03:41 PM

SELECT SUM(field_name) AS mysum FROM tablexyz

Info: PHP Manual


#3 avo

avo
  • Members
  • PipPipPip
  • Advanced Member
  • 148 posts
  • Locationstaffordshire uk

Posted 08 May 2006 - 03:41 PM

HI

Can you explan a little further please.

Do you want to count the numer of rows you have filled in a mysqltable ?

or?
Im loving it ........




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users