MySQL Error

The site is attempting to execute a command that is generating an error in the database. This is most likely caused by either entering bad data or a due to a program bug. If you continue to experience this problem please contact the developer.

SQL Command

SELECT * FROM photos WHERE review_id= LIMIT 1 OFFSET -1

Error Message from database (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 'LIMIT 1 OFFSET -1' at line 1