Error on page
1052 - Column 'date_created' in order clause is ambiguous
SELECT distinct( contents.content_id ), content_values.main_visible, content_values.title, content_values.content, content_values.connection_url, content_values.connection_file, content_values.connection_type_id, connection_types.connection_type, content_values.language_id, languages.language, contents.department_id, department_values.department, parent_departments.department_id as parent_department_id, parent_department_values.department as parent_department, contents.category_id, category_values.category, categories.url, contents.menu_id, menu_values.menu, menus.parent_menu_id, menu_values.multiple, menus.group_id, `groups`.group, targets.target, targets.target_id, content_values.create_user_id, create_users.username as create_username, concat( create_users.lastname, ' ', create_users.firstname ) as create_fullname, content_values.update_user_id, update_users.username as update_username, concat( update_users.lastname, ' ', update_users.firstname ) as update_fullname, content_values.date_created, date_format(content_values.date_created, '%d/%m/%Y' ) as date_created, date_format(content_values.date_updated, '%d/%m/%Y' ) as date_updated, date_format(content_values.date_expired, '%d/%m/%Y' ) as date_expired, date_format(content_values.date_to_view, '%d/%m/%Y' ) as date_to_view, content_values.active, content_values.prokiriksi, date_format(content_values.hm_sigklisis_simbouliou, '%d/%m/%Y' ) as hm_sigklisis_simbouliou, content_values.apospasma_praktikou, date_format(content_values.hm_sigklisis_eklektrorikou, '%d/%m/%Y' ) as hm_sigklisis_eklektrorikou, content_values.praktiko_orismou_trimelis, date_format(content_values.hm_katathesis_isigitikis, '%d/%m/%Y' ) as hm_katathesis_isigitikis, date_format(content_values.hm_sigklisis_eklogis, '%d/%m/%Y' ) as hm_sigklisis_eklogis, content_values.praktiko_apotelesmatwn FROM contents LEFT JOIN content_values on content_values.content_id = contents.content_id LEFT JOIN languages on languages.language_id = content_values.language_id LEFT JOIN connection_types on connection_types.connection_type_id = content_values.connection_type_id LEFT JOIN departments on departments.department_id = contents.department_id LEFT JOIN department_values on department_values.department_id = departments.department_id and department_values.language_id = languages.language_id LEFT JOIN departments as parent_departments on parent_departments.department_id = departments.parent_id LEFT JOIN department_values as parent_department_values on parent_department_values.department_id = parent_departments.department_id and parent_department_values.language_id = languages.language_id LEFT JOIN categories on categories.category_id = contents.category_id LEFT JOIN category_values on category_values.category_id = contents.category_id and category_values.language_id = languages.language_id LEFT JOIN menus on menus.menu_id = contents.menu_id LEFT JOIN menu_values on menu_values.menu_id = menus.menu_id and menu_values.language_id = languages.language_id LEFT JOIN `groups` on menus.group_id = `groups`.group_id LEFT JOIN targets on targets.target_id = contents.target_id LEFT JOIN users as create_users on create_users.user_id = content_values.create_user_id LEFT JOIN users as update_users on update_users.user_id = content_values.update_user_id WHERE languages.language_id = 1 AND contents.menu_id = 8025 AND content_values.active = 1 UNION SELECT distinct( contents.content_id ), content_values.main_visible, content_values.title, content_values.content, content_values.connection_url, content_values.connection_file, content_values.connection_type_id, connection_types.connection_type, content_values.language_id, languages.language, contents.department_id, department_values.department, parent_departments.department_id as parent_department_id, parent_department_values.department as parent_department, contents.category_id, category_values.category, categories.url, contents.menu_id, menu_values.menu, menus.parent_menu_id, menu_values.multiple, menus.group_id, `groups`.group, targets.target, targets.target_id, content_values.create_user_id, create_users.username as create_username, concat( create_users.lastname, ' ', create_users.firstname ) as create_fullname, content_values.update_user_id, update_users.username as update_username, concat( update_users.lastname, ' ', update_users.firstname ) as update_fullname, content_values.date_created, date_format(content_values.date_created, '%d/%m/%Y' ) as date_created, date_format(content_values.date_updated, '%d/%m/%Y' ) as date_updated, date_format(content_values.date_expired, '%d/%m/%Y' ) as date_expired, date_format(content_values.date_to_view, '%d/%m/%Y' ) as date_to_view, content_values.active, content_values.prokiriksi, date_format(content_values.hm_sigklisis_simbouliou, '%d/%m/%Y' ) as hm_sigklisis_simbouliou, content_values.apospasma_praktikou, date_format(content_values.hm_sigklisis_eklektrorikou, '%d/%m/%Y' ) as hm_sigklisis_eklektrorikou, content_values.praktiko_orismou_trimelis, date_format(content_values.hm_katathesis_isigitikis, '%d/%m/%Y' ) as hm_katathesis_isigitikis, date_format(content_values.hm_sigklisis_eklogis, '%d/%m/%Y' ) as hm_sigklisis_eklogis, content_values.praktiko_apotelesmatwn FROM contents LEFT JOIN content_values on content_values.content_id = contents.content_id LEFT JOIN languages on languages.language_id = content_values.language_id LEFT JOIN connection_types on connection_types.connection_type_id = content_values.connection_type_id LEFT JOIN departments on departments.department_id = contents.department_id LEFT JOIN department_values on department_values.department_id = departments.department_id and department_values.language_id = languages.language_id LEFT JOIN departments as parent_departments on parent_departments.department_id = departments.parent_id LEFT JOIN department_values as parent_department_values on parent_department_values.department_id = parent_departments.department_id and parent_department_values.language_id = languages.language_id LEFT JOIN categories on categories.category_id = contents.category_id LEFT JOIN category_values on category_values.category_id = contents.category_id and category_values.language_id = languages.language_id LEFT JOIN menus on menus.menu_id = contents.menu_id LEFT JOIN menu_values on menu_values.menu_id = menus.menu_id and menu_values.language_id = languages.language_id LEFT JOIN `groups` on menus.group_id = `groups`.group_id LEFT JOIN targets on targets.target_id = contents.target_id LEFT JOIN users as create_users on create_users.user_id = content_values.create_user_id LEFT JOIN users as update_users on update_users.user_id = content_values.update_user_id WHERE languages.language_id = 1 AND content_values.active = 1 AND contents.category_id = 9 ORDER BY BINARY parent_department ASC, department asc, date_created DESC, title ASC