Появилась ошибка после перехода с 4.1.12 на 5.0.15. Помогите

beba

Новичок
Появилась ошибка после перехода с 4.1.12 на 5.0.15. Помогите

Есть запрос.
PHP:
select a.articles_id 
from articles a, articles_to_topics a2t,
         left join topics_description td on a2t.topics_id = td.topics_id,
         left join authors au on a.authors_id = au.authors_id, articles_description ad 
where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '1' and td.language_id = '1' and a.articles_date_added > SUBDATE(now( ), INTERVAL '30' DAY)
На версии 4.1.12 работает замечательно. А вот на версии 5.0.15 выдает ошибку:
Error Code : 1054
Unknown column 'a.authors_id' in 'on clause'
Почему?
Спасиб. за внимание.
 

Апельсин

Оранжевое создание

Incompatible change: Beginning with MySQL 5.0.12, natural joins and joins with USING, including outer join variants, are processed according to the SQL:2003 standard. The changes include elimination of redundant output columns for NATURAL joins and joins specified with a USING clause and proper ordering of output columns. The precedence of the comma operator also now is lower compared to JOIN, LEFT JOIN, and so forth.

These changes make MySQL more compliant with standard SQL. However, they can result in different output columns for some joins. Also, some queries that appeared to work correctly prior to 5.0.12 must be rewritten to comply with the standard. For details about the scope of the changes and examples that show what query rewrites are necessary, see Section 13.2.7.1, “JOIN Syntax”.


http://dev.mysql.com/doc/refman/5.0/en/upgrading-from-4-1.html
 

confguru

ExAdmin
Команда форума
В поиск по форуму..

Проверяйте join перед переходом на mysql5
 
Сверху