FRA Junior Championships 2017 -

MySQL error 1052

Column 'racesentered' in where clause is ambiguous
Page: 1 of 1  Records: 

MySQL error 1052

Column 'racesentered' in where clause is ambiguous

phpMyEdit error: invalid SQL query


SELECT `PMEtable0`.`id` AS `qf0`,CONCAT("<!-- ",agposition,"--><span style=\"padding: 2px 6px 2px 6px; background-color:", IF(agposition = 1,"#FFD700",IF(agposition = 2,"#C0C0C0",IF(agposition = 3,"#CD853F","white"))), "\">", agposition, "</span>") AS `qf1`,`PMEtable0`.`forename` AS `qf2`,`PMEtable0`.`surname` AS `qf3`,`PMEjoin4`.`club` AS `qf4`,`PMEtable0`.`clubid6` AS `qf4_idx`,`PMEtable0`.`agegrp` AS `qf5`,`PMEtable0`.`agscore` AS `qf6`,`PMEtable0`.`racesentered` AS `qf7`,`PMEtable0`.`points1` AS `qf8`,`PMEtable0`.`points2` AS `qf9`,`PMEtable0`.`points3` AS `qf10`,`PMEtable0`.`points4` AS `qf11`,`PMEtable0`.`points5` AS `qf12`,`PMEtable0`.`points6` AS `qf13` FROM `FRAJunior17` AS `PMEtable0` LEFT OUTER JOIN `FRAJuniorClub17` AS `PMEjoin4` ON (`PMEjoin4`.`id` = `PMEtable0`.`clubid6`) WHERE (agegrp = '' and racesentered > 0) ORDER BY `PMEtable0`.`agscore` DESC,`PMEtable0`.`surname`,`PMEtable0`.`forename` LIMIT 0,15
Place Surname Club Age Group Score No. Races Cock Howe West Nab Anniversary Wa! Coiners Great Whernside Cowpe