Query failed: <pre>SELECT 
                    e.isdraft AS orderkey,

                    e.id,
                    e.title,
                    e.timestamp,
                    e.comments,
                    e.exflag,
                    e.authorid,
                    e.trackbacks,
                    e.isdraft,
                    e.allow_comments,
                    e.last_modified,

                    a.realname AS author,
                    a.username AS loginname,
                    a.email
                     , e.body, e.extended
                     
                FROM
                    sp_entries AS e
                    LEFT JOIN sp_authors a
                        ON e.authorid = a.authorid
                    LEFT JOIN sp_entrycat ec
                        ON e.id = ec.entryid
                    LEFT JOIN sp_category c
                        ON ec.categoryid = c.categoryid
                     LEFT OUTER JOIN sp_entryproperties ep_no_frontpage
                                                  ON (e.id = ep_no_frontpage.entryid AND ep_no_frontpage.property = 'ep_no_frontpage')
 LEFT OUTER JOIN sp_entryproperties ep_access
                                              ON (e.id = ep_access.entryid AND ep_access.property = 'ep_access') LEFT JOIN sp_authorgroups AS acl_a
                                   ON acl_a.authorid = 0
                            LEFT JOIN sp_access AS acl_acc
                                   ON (    acl_acc.artifact_mode = 'read'
                                       AND acl_acc.artifact_type = 'category'
                                       AND acl_acc.artifact_id   = c.categoryid
                                      )
                    WHERE isdraft = 'false' AND  (ep_access.property IS NULL OR ep_access.value = 'public') AND  (ep_no_frontpage.property IS NULL OR ep_no_frontpage.value != 'true')   AND     (
                                 c.categoryid IS NULL
                                 OR ( acl_acc.groupid = 0)
                                 OR ( acl_acc.artifact_id IS NULL
                                      
                                    )
                               )
                     GROUP BY e.id
            ORDER BY orderkey DESC, timestamp DESC
                     0</pre> / 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 '0' at line 47