Database Error

Error: SQLSTATE[HY000]: General error: 3065 Expression #1 of ORDER BY clause is not in SELECT list, references column 'hydrobio.TaxonInvertebre.rang' which is not in SELECT list; this is incompatible with DISTINCT

SQL Query: SELECT DISTINCT `TaxonInvertebre`.`code_sandre`, `TaxonInvertebre`.`nom` FROM `hydrobio`.`releve_invertebre` AS `ReleveInvertebre` LEFT JOIN `hydrobio`.`taxon_invertebre` AS `TaxonInvertebre` ON (`TaxonInvertebre`.`code_sandre` = `ReleveInvertebre`.`code_sandre`) WHERE `ReleveInvertebre`.`liste_id` IN (17278, 17291, 17306, 17309, 17316, 17322, 17327, 17333, 17336, 17342, 17346, 18595, 20284, 29097, 31304, 32829) ORDER BY `TaxonInvertebre`.`rang` ASC

Notice: If you want to customize this error message, create app/View/Errors/pdo_error.ctp

Stack Trace