|
|
 Избранные мероприятия
SELECT a.*, a.starton AS starton_ts, a.endon AS endon_ts, feat.adid AS isfeat,
COUNT(*) AS piccount, p.picfile AS picfile, ct.cityname
FROM clf_events a
INNER JOIN clf_featured feat ON a.adid = feat.adid AND feat.adtype = 'E' AND feat.featuredtill >= NOW()
INNER JOIN clf_cities ct ON a.cityid = ct.cityid
LEFT OUTER JOIN clf_adpics p ON a.adid = p.adid AND p.isevent = '1'
WHERE a.enabled = '1' AND a.verified = '1' AND a.expireson >= NOW()
AND ct.countryid = 1
AND a.starton >= NOW()
GROUP BY a.adid
ORDER BY a.starton ASC
LIMIT 5Table 'baraban1.clf_events' doesn't exist | | |
|