 Featured Ads
 Upcoming Featured Events
SELECT a.*, UNIX_TIMESTAMP(a.starton) AS starton_ts, UNIX_TIMESTAMP(a.endon) AS endon_ts, feat.adid AS isfeat,
COUNT(*) AS piccount, p.picfile AS picfile, ct.cityname
FROM xzclf_events a
INNER JOIN xzclf_featured feat ON a.adid = feat.adid AND feat.adtype = 'E' AND feat.featuredtill >= NOW()
INNER JOIN xzclf_cities ct ON a.cityid = ct.cityid
LEFT OUTER JOIN xzclf_adpics p ON a.adid = p.adid AND p.isevent = '1'
WHERE a.enabled = '1' AND a.verified = '1' AND a.expireson >= NOW() AND a.paid <> '0'
AND a.starton >= NOW()
GROUP BY a.adid
ORDER BY a.starton ASC
LIMIT 5Table './eastcals_one/xzclf_events' is marked as crashed and last (automatic?) repair failed |
|