I'm trying to make a list of records from differnet groups and that works just fine, but now I only want to get the rcords from a specific year... How do I go about that?
$currYear = 2011;
$sql = "SELECT cu.clubid,AVG(point_total) AS avg_stfpoints, COUNT(point_total) AS counted, c.clubname, c.ccountry, c.seoname, si.regdate FROM ".$prefix."_score_info si
INNER JOIN ".$prefix."_club_users cu ON cu.new_userid = si.user
INNER JOIN ".$prefix."_club c ON c.clubid = cu.clubid
GROUP BY cu.clubid
HAVING COUNT(point_total) >= 10 ORDER BY avg_stfpoints DESC;";
I have a date/time field in the score_info table.
Hoping for help and thanks in advance...