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 'rows, title, header, footer, frontend, img_size, thumb_type, e2_transitionspe...' at line 1. Your SQL query is: SELECT ID, columns, rows, title, header, footer, frontend, img_size, thumb_type, e2_transitionspeed, e2_fadespeed FROM `wwwkosmokultch`.`module_gallery` WHERE instanceid=4