A Database Error Occurred

Error Number: 1055

Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'sortezprod.villes.IdVille' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

SELECT villes.IdVille, villes.ville_nom, commercants.IsActif, COUNT(commercants.IdCommercant) as nbCommercant FROM commercants LEFT OUTER JOIN villes ON villes.IdVille = commercants.IdVille WHERE (commercants.IsActif = '1' OR commercants.IsActif = '2') AND commercants.referencement_annuaire = 1 GROUP BY villes.ville_nom asc

Filename: models/Mdlville.php

Line Number: 4611