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 e.end_date >= cast(now() as date) ORDER BY id desc limit 5' at line 1

select e.*,c.name as city_name,s.name as state_name,co.name as country_name from events e inner join cities c on c.id=e.city inner join states s on s.id=e.state inner join countries co on co.id=e.country where e.id NOT IN () AND e.end_date >= cast(now() as date) ORDER BY id desc limit 5

Filename: controllers/web/Events.php

Line Number: 44