SELECT a.*, UNIX_TIMESTAMP(a.createdon) AS createdon,
COUNT(*) AS commentcount, ic.imgid AS hascomments
FROM phpas_imgs a
INNER JOIN phpas_cities ct ON a.cityid = ct.cityid
LEFT OUTER JOIN phpas_imgcomments ic ON a.imgid = ic.imgid
WHERE a.enabled = '1' AND a.verified = '1' AND a.expireson >= NOW()
AND MD5(UPPER(CONCAT('IMG', '>@<', a.postername, '>@<', a.posteremail))) = '67-pyrenees-orientales' AND a.cityid = 67
GROUP BY a.imgid
ORDER BY a.timestamp DESC
LIMIT 0, 5Can't create/write to file '/tmp/#sql_346_5.MAI' (Errcode: 28 "No space left on device") |