mysql

Discussion in 'PHP' started by dnnov, 25 May 2011.

  1. dnnov

    dnnov New Member

    Joined:
    12 Jun 2010
    Messages:
    0
    Likes Received:
    0
    Reputations:
    0
    ребят есть таблица видаЖ
    id | name | money

    1 вася 200
    2 петя 250
    3 иван 150



    необходимо посчитать столбец money т.е 200+250 + 150 и тд..
    как это можно реализовать?
     
  2. krypt3r

    krypt3r Elder - Старейшина

    Joined:
    27 Apr 2007
    Messages:
    1,507
    Likes Received:
    389
    Reputations:
    101
    Code:
    SELECT SUM(`money`) FROM `sometable`;
    
     
Loading...