SQL error: SELECT e.*, g.filename FROM events e LEFT JOIN graphics g ON (g.id=e.attachment) WHERE e.type='mainEvent' AND e.active=1 ORDER BY e.edate DESC LIMIT -6,6