You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
SELECT MAX(ACTIVE_FROM) ACTIVE_DATE FROM articles AS a LEFT JOIN author_articles AS b on a.ID=b.ARTICLE_ID WHERE b.AUTHOR_ID=