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 publicado = 1 ORDER BY posicion ASC' at line 1

SELECT id, nombre, imagen FROM tercera_categorias WHERE id in() AND publicado = 1 ORDER BY posicion ASC