Expression #10 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'honestys_theperformancetree.dtw_content.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by | php_file_tree.php | SELECT dtw_webpages.*, dtw_webpages.webkey_id, dtw_webkeys.webkey, dtw_content.id AS cid, dtw_content.the_order FROM dtw_webpages inner join dtw_webkeys on dtw_webpages.webkey_id= dtw_webkeys.id INNER join dtw_content on dtw_webpages.id= dtw_content.webpage_id WHERE dtw_webpages.parent= '1' AND show_in_menu='1' AND dtw_content.the_order= '1' GROUP BY dtw_webpages.id order by menu_order, dtw_content.the_order