ERROR #1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) AND p.aktywnosc=1 order by p.idkarta_produktu desc limit 0,40' at line 5
QUERY #11:"SELECT k.idkategorie as kategoria, k.sciezka, k.ile_procent AS dzieciece, p.*, (select zdj.nazwa from zdjecia zdj where zdj.idkarta_produktu=p.idkarta_produktu ORDER BY zdj.idzdjecia limit 1) AS foto, n.idkarta_produktu AS checknews
FROM karta_produktu p
LEFT JOIN kategorie k ON k.idkategorie=p.idkategorie
LEFT JOIN newsletter2 n ON n.idkarta_produktu=p.idkarta_produktu AND n.wyslano=0
WHERE (p.idkategorie IN (SELECT idkategorie FROM kategorie WHERE idparent=287) OR k.idparent IN ()) AND p.aktywnosc=1 order by p.idkarta_produktu desc limit 0,40"
ERROR #1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) AND p.aktywnosc=1 order by p.idkarta_produktu desc' at line 5
QUERY #15:"SELECT k.idkategorie as kategoria, k.sciezka, k.ile_procent AS dzieciece, p.*, (select zdj.nazwa from zdjecia zdj where zdj.idkarta_produktu=p.idkarta_produktu ORDER BY zdj.idzdjecia limit 1) AS foto, n.idkarta_produktu AS checknews
FROM karta_produktu p
LEFT JOIN kategorie k ON k.idkategorie=p.idkategorie
LEFT JOIN newsletter2 n ON n.idkarta_produktu=p.idkarta_produktu AND n.wyslano=0
WHERE (p.idkategorie IN (SELECT idkategorie FROM kategorie WHERE idparent=287) OR k.idparent IN ()) AND p.aktywnosc=1 order by p.idkarta_produktu desc "