select main.*, as category_name, category.title as category_title, as category_id, category.master_id as category_master_id from (select a.*, c.* from product a, product_lang c where and c.lang_id = '1') main left join (select * from category_element where identifier = 'product') rel on left join (select a.*, c.* from category a, category_lang c where and c.lang_id = '1') category on left join (select * from category where status=1) d on where 1=1 and main.seo='stylish-display-unit' and main.master_id='7' and main.status = 1 group by , main.order_no asc Expression #35 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