Board index   FAQ   Search  
Register  Login
Board index php forum :: Database mySQL & php coding

Return The Sum Of The Same ID

Codes here !

Moderators: macek, egami, gesf

Return The Sum Of The Same ID

Postby rochellecanale » Mon Oct 01, 2012 10:34 pm

hey guys I need a little help my problem is this:

points_ledger table
Code: Select all
ledger_id      |    date    |   running_balance    |    fkmember   |
    1          |  01/29/12  |          5                 |       1           |
    2          |  02/16/12  |         30                 |       1           |
    3          |  02/30/12  |         500                |       2           |
 


Thats my simple table: Now My Problem is. How can i get the sum of the running_balance of the same fkmember? And my output should be like this when i want to display in PHP.

Code: Select all
fkmember | running_balance |
 1             |        35              |
 2             |         500           |

Please help me guys im in a middle of a project.
rochellecanale
New php-forum User
New php-forum User
 
Posts: 4
Joined: Thu Sep 27, 2012 7:49 pm

Re: Return The Sum Of The Same ID

Postby egami » Tue Oct 02, 2012 7:36 am

Is this a school project?
User avatar
egami
php-forum GURU
php-forum GURU
 
Posts: 2197
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Re: Return The Sum Of The Same ID

Postby seandisanti » Tue Oct 02, 2012 10:00 am

Where's your attempt at the work? Can't really expect others to do your homework without at least offering evidence that you've given it a shot
seandisanti
php-forum Fan User
php-forum Fan User
 
Posts: 783
Joined: Mon Oct 01, 2012 12:32 pm


Return to mySQL & php coding

Who is online

Users browsing this forum: Google [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.