Jump to content

Attempting to get a list of names only once and add up reward


pkedpker

Recommended Posts

How would I go about getting whoreferred added up their reward and show it under name sspoke.

 

Say I login sspoke I should see jayman there with a reward of 33+21=0.54

 

I also want to see all the other users other then jayman and their totals SUM'ed up.

 

I have no clue how to go about making this query

 

mysql> SELECT * FROM referrers;
+----+----------+-------------+--------+---------------------+
| id | referrer | whoreferred | reward | date_credited       |
+----+----------+-------------+--------+---------------------+
|  1 | Admin    | sspoke      |   0.43 | 2012-04-24 14:04:06 |
|  2 | Admin    | sspoke      |   0.43 | 2012-04-24 14:04:06 |
|  3 | sspoke   | jayman      |   0.33 | 2012-04-24 14:04:06 |
|  4 | sspoke   | jayman      |   0.21 | 2012-04-24 14:04:06 |
+----+----------+-------------+--------+---------------------+

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.