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 |
+----+----------+-------------+--------+---------------------+

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.