I am trying to retrive the total of values from a table but i also need to gather info from another table, i thus need to join the 2 tables together but am running into a few problems
here is my current query
Code:
SELECT r.*,p.* SUM(refREFER) AS SUM FROM referals r LEFT JOIN players p WHERE r.refREFER=p.userid
thats not returning any information at all, the refREFER is the same value as the userid and i need to calculate the total amount of instances of refREFER from the referals table and also be able to join them with the userid from the users table.
does anyone have any thoughts as to what im doing wrong here?