Invalid query: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') WHERE news.pokaz = 2 and ( news.start <='2024-11-21 09:59:14' && ne...' at line 2 Whole query: SELECT * from news JOIN news_relacje ON news_relacje.art_id = news.art_id and news_relacje.id IN ( ) WHERE news.pokaz = 2 and ( news.start <='2024-11-21 09:59:14' && news.koniec >= '2024-11-21 09:59:14' ) AND news.art_id NOT IN ( 754652304 ) ORDER BY news_relacje.level DESC LIMIT 9