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 ') GROUP BY p.id ORDER BY p.posicion ASC' at line 1

SELECT p.id, p.imagen, p.marca_id, (pd.precio - (pd.precio * (pd.descuento/100))) as pre, p.pack, p.nombre FROM productos p, productos_detalles pd WHERE p.publicado = 1 AND pd.producto_id = p.id AND p.id in() GROUP BY p.id ORDER BY p.posicion ASC