maxdev
Новичок
SQL error ошибка в LEFT JOIN
Подскажите пож в чем ощибка, непойму что не так в LEFT JOIN
SQL-запрос:
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 )
LIMIT 0 , 30
Ответ MySQL:
#1054 - Unknown column 'a.authors_id' in 'on clause'
-~{}~ 22.02.07 00:09:
PS: Все поля существуют
Подскажите пож в чем ощибка, непойму что не так в LEFT JOIN
SQL-запрос:
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 )
LIMIT 0 , 30
Ответ MySQL:
#1054 - Unknown column 'a.authors_id' in 'on clause'
-~{}~ 22.02.07 00:09:
PS: Все поля существуют