A Database Error Occurred

Error Number: 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 'AND ResponseCode in ('00','08') GROUP BY team_id ORDER BY total desc ' at line 3

SELECT team_id, SUM(TotalAmount) as total FROM wp_ocpayments where event_id = AND ResponseCode in ('00','08') GROUP BY team_id ORDER BY total desc LIMIT 5;

Filename: models/Team_m.php

Line Number: 111