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

                    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
                     
                     
                FROM
                    serendipity_entries AS e
                    LEFT JOIN serendipity_authors a
                        ON e.authorid = a.authorid
                    LEFT JOIN serendipity_entrycat ec
                        ON e.id = ec.entryid
                    LEFT JOIN serendipity_category c
                        ON ec.categoryid = c.categoryid
                     LEFT OUTER JOIN serendipity_entryproperties ep_cache_extended
                                                  ON (e.id = ep_cache_extended.entryid AND ep_cache_extended.property = 'ep_cache_extended')
 LEFT OUTER JOIN serendipity_entryproperties ep_cache_body
                                                  ON (e.id = ep_cache_body.entryid AND ep_cache_body.property = 'ep_cache_body')
 LEFT OUTER JOIN serendipity_entryproperties ep_access
                                              ON (e.id = ep_access.entryid AND ep_access.property = 'ep_access') LEFT JOIN serendipity_authorgroups AS acl_a
                                   ON acl_a.authorid = 0
                            LEFT JOIN serendipity_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 (( (c.category_left  BETWEEN 4 AND 5))) AND e.timestamp &lt;= 1368891000 AND  (ep_access.property IS NULL OR ep_access.value = 'public')  AND (e.id NOT IN (SELECT e.id FROM serendipity_entries AS e
                            LEFT JOIN serendipity_entrycat AS ec ON ec.entryid = e.id
                            JOIN serendipity_categorytemplates AS t ON ec.categoryid = t.categoryid AND hide_rss = '1'))  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, last_modified DESC
                      LIMIT 1</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 'SELECT e.id FROM serendipity_entries AS e
                      