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 meta.table = 'content' AND meta.published =1 UNION SELECT 1 as partIndex, co' at line 1
The bad SQL-Statement: SELECT 0 as partIndex, content.id as partID, meta.order as morder FROM `content` AS content LEFT JOIN `EdithMeta` AS meta ON meta.recordID = content.id WHERE content.parentID = AND meta.table = 'content' AND meta.published =1 UNION SELECT 1 as partIndex, content.id as partID, meta.order as morder FROM `content_text_image` AS content LEFT JOIN `EdithMeta` AS meta ON meta.recordID = content.id WHERE content.contentID = AND meta.table = 'content_text_image' AND meta.published =1 UNION SELECT 2 as partIndex, content.id as partID, meta.order as morder FROM `content_image` AS content LEFT JOIN `EdithMeta` AS meta ON meta.recordID = content.id WHERE content.contentID = AND meta.table = 'content_image' AND meta.published =1 UNION SELECT 3 as partIndex, content.id as partID, meta.order as morder FROM `content_download` AS content LEFT JOIN `EdithMeta` AS meta ON meta.recordID = content.id WHERE content.contentID = AND meta.table = 'content_download' AND meta.published =1 ORDER BY morder ASC