Is it possible to fetch data from a database and then add that up

Discussion in 'MySQL' started by mrgrant, Dec 31, 2008.

  1. #1
    I know how to fetch from a database but is it possible to add all that data up for example get all data from "example" and then total that data, so i get a figure.
    if so how do i do the addition part
     
    mrgrant, Dec 31, 2008 IP
  2. oxidati0n

    oxidati0n Peon

    Messages:
    744
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    With MYSQL you'd focus on this query.

    SELECT COUNT(*) AS `num` FROM `table` WHERE `user` LIKE('%John%')

    :)
     
    oxidati0n, Dec 31, 2008 IP
  3. fairuz.ismail

    fairuz.ismail Peon

    Messages:
    232
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #3
    fairuz.ismail, Jan 1, 2009 IP
  4. mrgrant

    mrgrant Member

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #4
    thanks alot for your help :)
     
    mrgrant, Jan 1, 2009 IP