Database error: select

Message: SQLSTATE[42000]: Syntax error or access violation: 1064 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 '-1, 1' at line 1 File: /home/kinogaller/domains/kinogallery.com/public_html/inc/config.php (Line 161) #0 /home/kinogaller/domains/kinogallery.com/public_html/inc/config.php(161): PDOStatement->execute(NULL) #1 /home/kinogaller/domains/kinogallery.com/public_html/inc/config.php(155): DB->_select('SELECT * FROM i...', NULL) #2 /home/kinogaller/domains/kinogallery.com/public_html/image/index.php(69): DB->fetchAll('SELECT * FROM i...') #3 /home/kinogaller/domains/kinogallery.com/public_html/image/index.php(192): frame(NULL, 2, 'photos', NULL, 1) #4 {main}