SELECT `res_149`.`nom`, `prenom`, `cat`, `dossard`, `id_club`, `associations`.`nom` AS `nomclub` FROM `res_149` LEFT JOIN `associations` ON `associations`.`id` = `res_149`.`id_club` WHERE `res_149`.`class` NOT IN ('','00:00:00','-',0) GROUP BY `res_149`.`cat` ORDER BY res_149.score DESC Unknown column 'res_149.class' in 'where clause'