DB Error: selectSingle query failed
SELECT
file_attachments.*,
channels.name AS channel,
files.name,
files.ext,
files.type_id
FROM
file_attachments
LEFT JOIN files ON files.id = file_attachments.file_id
LEFT JOIN channels ON channels.id = file_attachments.channel_id
WHERE channels.name = 'droetker_contests_headers' AND object_id = AND main = 1
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND main = 1' at line 11