Query Error in 'getPages' method in '/var/www/vhosts/dh24.co.uk/httpdocs/db.php' on line 4483: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'OR cp_item.cpf_id = 1) GROUP BY cp_item.cpi_id ORDER BY FIELD(cp_item.cpi_id,...' at line 45- Full query: /* getPages */ SELECT cp_item.cpi_id , cp_item.cpda_id AS set_page_cpda_id , cp_item.cpi_menu_image , cp_item.cpi_scroll_page , cp_item.cpi_link_in_menu , cp_item.cpi_include_in_menu , cp_item.cpi_link_on_mobile , table4.cpda_meta_val AS cpi_name , table5.cpda_meta_val AS cpi_link , table6.cpda_meta_val AS cpi_link_target , table7.cpda_meta_val AS cpi_link_on_mobile_page_data , cp_item.cpi_type , cp_item.cpf_id , cp_item.cpi_folder , cp_item.cpi_active , table2.cpda_id AS element_cpda_id , table1.cpda_meta_val AS display_language , GROUP_CONCAT(table1.cpda_meta_val) AS display_regions FROM cp_item LEFT OUTER JOIN cp_data AS table0 ON table0.cpda_meta_val = cp_item.cpi_id AND table0.cpda_meta_key = '-2001' LEFT OUTER JOIN cp_data AS table1 ON table1.cpda_meta_id = table0.cpda_meta_id AND table1.cpda_meta_key = '-2002' LEFT OUTER JOIN cp_data AS table2 ON table2.cpda_id = table0.cpda_meta_id AND table2.cpda_meta_key = 'set_element_stub' LEFT OUTER JOIN cp_data AS table4 ON table4.cpda_meta_id = table0.cpda_meta_id AND table4.cpda_meta_key = '-2005' LEFT OUTER JOIN cp_data AS table5 ON table5.cpda_meta_id = table0.cpda_meta_id AND table5.cpda_meta_key = '-2010' LEFT OUTER JOIN cp_data AS table6 ON table6.cpda_meta_id = table0.cpda_meta_id AND table6.cpda_meta_key = '-2011' LEFT OUTER JOIN cp_data AS table7 ON table7.cpda_meta_id = table0.cpda_meta_id AND table7.cpda_meta_key = '-2012' WHERE table2.cpda_active = 1 AND cp_item.cpi_type IN ('F', 'P', 'B', 'L') AND table1.cpda_meta_val = -1999 AND cp_item.cpi_active = 'on' AND table1.cpda_active = 1 AND (cp_item.cpi_id = OR cp_item.cpf_id = 1) GROUP BY cp_item.cpi_id ORDER BY FIELD(cp_item.cpi_id, ) DESC, cp_item.cpi_seq