![](images/featured.gif) Annonce VIP
SELECT a.*, ct.cityname, UNIX_TIMESTAMP(a.createdon) AS timestamp, feat.adid AS isfeat,
COUNT(*) AS piccount, p.picfile AS picfile, scat.subcatname, scat.catid, cat.catname
FROM phpas_ads a
INNER JOIN phpas_featured feat ON a.adid = feat.adid AND feat.adtype = 'A' AND feat.featuredtill >= NOW()
INNER JOIN phpas_cities ct ON a.cityid = ct.cityid
INNER JOIN phpas_subcats scat ON a.subcatid = scat.subcatid
INNER JOIN phpas_cats cat ON scat.catid = cat.catid
LEFT OUTER JOIN phpas_adpics p ON a.adid = p.adid AND p.isevent = '0'
WHERE a.enabled = '1' AND a.verified = '1' AND a.expireson >= NOW()
AND a.cityid = 59
GROUP BY a.adid
ORDER BY a.createdon DESC
LIMIT 5Can't create/write to file '/tmp/#sql_346_0.MAI' (Errcode: 28 "No space left on device") |