Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1' in /home/burmese1/public_html/include/mydb.php:45 Stack trace: #0 /home/burmese1/public_html/include/mydb.php(45): PDO->query('SELECT pg_index...') #1 /home/burmese1/public_html/view_photo.php(7): MyPDO->query('SELECT pg_index...') #2 {main} thrown in /home/burmese1/public_html/include/mydb.php on line 45