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 '@fobija.net AND gallery.visible=1' at line 1You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '@fobija.net AND gallery.visible=1 AND gallery.userID=users.id ORDER BY galler...' at line 1