error getting fixtures SELECT, f.squadid, s.squadname,, f.opponentname, f.leagueid, leaguename, date_format(,'%a %D %b %Y') as nicedate, f.location, f.opponentid, f.fix_opp_id, f.teamvis, as fixtureid, f.writeup, year( as year, gamepointsforwin, gamepointsfordraw,gamepointsforlose, gamescoring, f.adjustment, fopp.adjustment as opponent_adjustment FROM fixtures f INNER JOIN leagues l ON INNER JOIN squads s ON LEFT JOIN fixtures fopp ON = f.fix_opp_id LEFT JOIN squads opponentsquad ON = f.opponentid WHERE 1=1 AND <= CURDATE() AND year( = 2020 AND (s.squadname = 'Whitefields' OR opponentsquad.squadname = 'Whitefields') ORDER BY date desc, f.time desc, GREATEST(f.fix_opp_id,, location 0