SELECT g.*, as ctg_name, as album_name, as author_name, DATE_FORMAT(, '%d.%m.%Y .') as date FROM gallery as g LEFT OUTER JOIN gallery_photo2ctg as p2ctg ON p2ctg.photo_id = LEFT OUTER JOIN gallery_categories as ctgs ON = p2ctg.ctg_id LEFT OUTER JOIN gallery_albums as a ON = g.album LEFT OUTER JOIN gallery_authors as auth ON = WHERE g.published=1 AND ctgs.published=1 AND a.published=1 AND'8' GROUP BY ORDER BY, LIMIT 0, 30
Expression #17 of SELECT list is not in GROUP BY clause and contains nonaggregated column '' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by