zonas/obras -> Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'antonio9_sitio.HtmTxt.title' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
SELECT HtmPage.seccao, HtmTxt.title, HtmTxt.txt, YEAR(PObras.data), HtmTxt.canonico, HtmMedia.thumb FROM HtmTxt,HtmCat,PObras,HtmPage LEFT JOIN (HtmMedia) ON (HtmMedia.Pag=HtmPage.Pag AND HtmMedia.classf='pag' AND HtmMedia.tipo='image') WHERE HtmPage.seccao='discos' AND HtmCat.Cat='5' AND HtmTxt.Pag=HtmPage.Pag AND HtmCat.Pag=HtmPage.Pag AND PObras.Pag=HtmPage.Pag AND HtmPage.stat IN ('dst','pub') 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 HtmPage.Pag ORDER BY PObras.data 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