Sql ERROR: ErrID: 1064 ErrMsg: 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 File: Aderlee_Path_03/gallery.php Line: 159 Query: UPDATE `rawasy_gallery_pictures` SET `counter`=`counter`+1 WHERE `pid`= Sql ERROR: ErrID: 1064 ErrMsg: 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 File: Aderlee_Path_03/_inc/gallery/public/displayMedia.php Line: 300 Query: SELECT p.*, UNIX_TIMESTAMP(p.date) AS unix_time, c.galloc, c.visible, t.templatePictures, t.templateCSS, f.displaytag, f.filetype, f.description AS description_media FROM rawasy_gallery_pictures AS p LEFT JOIN rawasy_gallery_categories AS c ON c.gallid=p.gid LEFT JOIN rawasy_gallery_template_types AS t ON t.id=c.template LEFT JOIN rawasy_gallery_media_types AS f ON f.extension=p.extension WHERE pid=