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='50.17.74.162' AND sessionID='4498144ab3fc2e6ac1640ab7cb9e4005' AND date=' at line 1

Error Number : 1064

query : 'SELECT * FROM sys_visits WHERE site_id= AND ip='50.17.74.162' AND sessionID='4498144ab3fc2e6ac1640ab7cb9e4005' AND date='2015-07-29' AND time BETWEEN '18:10:51' AND '00:10:51' '