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 a.id_artykuly NOT IN (16669,16615,16558,16533) and id_statusy=7 and id_artyk' at line 1