select *,N.parent as Nparent,P.publiceren as PPP from gdc_cat_niveaus as N,gdc_cat_producten as P,gdc_cat_referenties as R where N.nivId=P.parent and R.parent=P.proId and R.publiceren=1 and R.refArchief=0 and proId=130 and refId=
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 '' at line 1