Произошла ошибка:



Query:
SELECT *, DATE_FORMAT(task.date_added,'%d.%m.%Y') AS date_added, (SELECT SUM(VALUE)/COUNT(*) FROM integrator_match JOIN `rating` ON rating.id_rating=integrator_match.id_child WHERE classname_parent='task' AND classname_child='rating' AND id_parent=task.id_task) AS rating, next_task.id_task AS id_task_next, prev_task.id_task AS id_task_prev, task_ref.title AS task_ref_title, podcast_ref.title AS podcast_ref_title, podcast_page.path AS podcast_ref_path, video_page.path AS video_ref_path, video_ref.title AS video_ref_title, case_ref.title AS case_ref_title, case_page.path AS case_ref_path, method_ref.title AS method_ref_title, dictionary_difficulty_lang.value AS difficulty_title, dictionary_age_lang.value AS age_title, dictionary_type_lang.value AS type_title, sg.img_small as shop_goods_img_small, sg.price as shop_goods_price, sgl.title as shop_goods_price, sgl.description as shop_goods_description, task.title as task_title FROM task LEFT JOIN method method_ref ON method_ref.id_method = task.id_method_ref LEFT JOIN task next_task ON next_task.id_task = (SELECT a.id_task FROM task a WHERE a.id_task > task.id_task LIMIT 1) LEFT JOIN task prev_task ON prev_task.id_task = (SELECT b.id_task FROM task b WHERE b.id_task < task.id_task order by b.id_task DESC LIMIT 1) LEFT JOIN page case_page ON case_page.id_page = (SELECT id_page FROM page_module WHERE id_page_module = (SELECT id_page_module FROM cases_list WHERE id_cases_list = (SELECT id_cases_list FROM cases WHERE id_cases = task.id_case_ref))) LEFT JOIN page podcast_page ON podcast_page.id_page = (SELECT id_page FROM page_module WHERE id_page_module = (SELECT id_page_module FROM news_list WHERE id_news_list = (SELECT id_news_list FROM news WHERE id_news = task.id_podcast_ref))) LEFT JOIN page video_page ON video_page.id_page = (SELECT id_page FROM page_module WHERE id_page_module = (SELECT id_page_module FROM news_list WHERE id_news_list = (SELECT id_news_list FROM news WHERE id_news = task.id_video_ref))) LEFT JOIN cases case_ref ON case_ref.id_cases = task.id_case_ref LEFT JOIN news_lang video_ref ON video_ref.id_news = task.id_video_ref LEFT JOIN news_lang podcast_ref ON podcast_ref.id_news = task.id_podcast_ref LEFT JOIN task task_ref ON task_ref.id_task=task.id_task LEFT JOIN dictionary_difficulty_lang ON dictionary_difficulty_lang.id_dictionary_difficulty=task.id_dictionary_difficulty LEFT JOIN dictionary_age_lang ON dictionary_age_lang.id_dictionary_age=task.id_dictionary_age LEFT JOIN dictionary_type_lang ON dictionary_type_lang.id_dictionary_type=task.id_dictionary_type LEFT JOIN shop_goods sg ON sg.id_shop_goods = task.id_shop_goods AND sg.is_show LEFT JOIN shop_goods_lang sgl ON sgl.id_shop_goods = sg.id_shop_goods WHERE task.is_show=1 ORDER by date_added DESC LIMIT 50
SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'date_added' in order clause is ambiguous


показать полный текст ошибки