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 '1,104,105,106,3,286,248,251,254,255,263,267,268,289,297,300,302,305,313,355,359,' at line 1
SELECT DISTINCT p.* FROM lng_produse p, lng_categorii c, lng_disponibilitate_grupe d WHERE p.id_categorie=c.id_categorie AND p.produs_cod=d.ecode AND p.id_categorie IN (,1,104,105,106,3,286,248,251,254,255,263,267,268,289,297,300,302,305,313,355,359,368,423,100000) AND p.pret>=-1 AND p.pret<=1 AND activ=1 AND activa=1 ORDER BY id_produs desc LIMIT 372680, 35