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 'in-torrevieja-the-perfect-home-for-your-holidays)' at line 3
SELECT new
FROM news_news_categories
WHERE cat IN (23,22,21,24,4,new-build-apartments-in-torrevieja-the-perfect-home-for-your-holidays)