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 'AND dfx_counter.nfx_id=nfx_news_konf.nfx_id AND nfx_news_styles.nfx_id=nfx_news_' at line 1 / SELECT nfx_news_konf.*,dfx_counter.*,nfx_rss.allow_rss,nfx_news_styles.color_1,nfx_news_styles.color_2,nfx_news_styles.color_3,nfx_news_styles.color_4, PERIOD_DIFF(201908,DATE_FORMAT(dfx_counter.nfx_datum_start,'%Y%m')) AS monthAktiv, MONTH(nfx_datum_start) AS monthStart, YEAR(nfx_datum_start) AS yearStart FROM nfx_news_konf,dfx_counter,nfx_news_styles,nfx_rss WHERE nfx_news_konf.nfx_id = AND dfx_counter.nfx_id=nfx_news_konf.nfx_id AND nfx_news_styles.nfx_id=nfx_news_konf.nfx_id AND dfx_counter.nfx_id=nfx_rss.nfx_id