zonas/anos -> Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'antonio9_sitio.HtmLog.actual' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
SELECT HtmPage.seccao, YEAR(HtmLog.actual) FROM HtmTxt,HtmLog,HtmPage WHERE HtmPage.seccao='news' AND HtmTxt.Pag=HtmPage.Pag AND HtmLog.Pag=HtmPage.Pag AND HtmPage.stat IN ('pub','arq') AND HtmTxt.lang=(SELECT lang FROM HtmTxt WHERE HtmTxt.Pag=HtmPage.Pag ORDER BY CASE WHEN HtmTxt.lang = 'pt' THEN 1 WHEN HtmTxt.lang = 'en' THEN 2 WHEN HtmTxt.lang = 'pt' THEN 3 ELSE 4 END ASC LIMIT 1) GROUP BY YEAR(HtmLog.actual) ORDER BY HtmLog.actual DESC

Compositor, Músico, Ensaísta, Investigador do CES, Professor na ESML

© 2013 António Pinho Vargas. Reservados todos os direitos. All rights reserved.
Desenvolvido por Luis_Pinto @ Cowork, Design Carlos Pinto