1064 - 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 k.prywatne<>1 order by k.kolejnosc, k.kat_art_id' at line 12

select distinct k.kat_art_id, k.nr_ref, k.kat_art_nazwa, k.kat_art_nadrzedne from kategorie_art k where k.kat_art_public=1 and k.kat_art_nadrzedne= and k.prywatne<>1 order by k.kolejnosc, k.kat_art_id

[TEP STOP]