Avan Framewrok

Database Error : 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 'AND ip='107.22.87.205' AND sessionID='139f1db8fab4fbb2545930683ccb7604' AND date' at line 1

Error Number : 1064

query : 'SELECT * FROM sys_visits WHERE site_id= AND ip='107.22.87.205' AND sessionID='139f1db8fab4fbb2545930683ccb7604' AND date='2015-07-03' AND time BETWEEN '19:54:30' AND '01:54:30' '