SELECT COUNT(*) AS adcount
FROM clf_events a
INNER JOIN clf_cities ct ON a.cityid = ct.cityid
LEFT OUTER JOIN clf_featured feat ON a.adid = feat.adid AND feat.adtype = 'E'
WHERE (starton <= '2018-10-18' AND endon >= '2018-10-18')
AND a.enabled = '1' AND a.verified = '1' AND a.expireson >= NOW()
AND (feat.adid IS NULL OR feat.featuredtill < NOW())
AND a.cityid = 91Table 'baraban1.clf_events' doesn't exist