Re: SUM problem.
Ok, I've read that article and well, I might be dumb but I couldn't make heads or tail of it :(
Well, the select should look something like this then ?
SELECT
t1.lepok_users.id AS userid,
t1.firstname,
t1.lastname,
t1.type,
t1.lepok_tourneys.id,
t1.date,
t1.user,
t1.torney,
t1.point,
count(*) AS earlier
FROM lepok_users AS t1,
lepok_result AS t1,
lepok_torneys AS t1
JOIN
lepok_users,
lepok_result,
lepok_torneys AS t2
ON
t1.userid=t2.userid AND
t1.type='$pligan' AND
t1.lepok_torneys.id=t1.torney AND
YEAR(t1.date)=YEAR(CURRENT_DATE())
GROUP BY
t1.userid
HAVEING earlier <= 8;
Or am I completly wrong here ?
And yes, I tried it and it didn't work ofcourse :(
But if I understand what I've just read, it should be something similar to that or ?