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 id_cat NOT IN (-1000,26,28,42,137,138,47,132,135,122,120,111,115,142,151) ' at line 4
SELECT * FROM orlan_cats WHERE parent_id = AND id_cat NOT IN (-1000,26,28,42,137,138,47,132,135,122,120,111,115,142,151) ORDER BY pos