Question2Answer query failed: (SELECT '0' AS selectkey, qa_posts.postid, qa_posts.categoryid, qa_posts.type, LEFT(qa_posts.type,1) AS basetype, INSTR(qa_posts.type, '_HIDDEN')>0 AS hidden, qa_posts.acount, qa_posts.selchildid, qa_posts.upvotes, qa_posts.downvotes, qa_posts.netvotes, qa_posts.views, qa_posts.hotness, qa_posts.flagcount, BINARY qa_posts.title AS title, BINARY qa_posts.tags AS tags, UNIX_TIMESTAMP(qa_posts.created) AS created, BINARY qa_categories.title AS categoryname, BINARY qa_categories.backpath AS categorybackpath, qa_posts.userid, qa_posts.cookieid, INET_NTOA(qa_posts.createip) AS createip, qa_userpoints.points, qa_users.flags, qa_users.level, BINARY qa_users.email AS email, CONVERT(qa_users.handle USING BINARY) AS handle, qa_users.avatarblobid, qa_users.avatarwidth, qa_users.avatarheight, NULL AS obasetype, NULL AS opostid, NULL AS ouserid, NULL AS ocookieid, NULL AS oip, NULL AS otime, NULL AS oflagcount, NULL AS opoints, NULL AS oflags, NULL AS olevel, NULL AS oemail, NULL AS ohandle, NULL AS oavatarblobid, NULL AS oavatarwidth, NULL AS oavatarheight, NULL AS oedited, NULL AS parentid, NULL AS qcount, NULL AS position, NULL AS content, NULL AS pageid, NULL AS nav, NULL AS widgetid, NULL AS place FROM qa_posts LEFT JOIN qa_categories ON qa_categories.categoryid=qa_posts.categoryid LEFT JOIN qa_users ON qa_posts.userid=qa_users.userid LEFT JOIN qa_userpoints ON qa_posts.userid=qa_userpoints.userid JOIN (SELECT postid FROM qa_posts WHERE catidpath1=(SELECT categoryid FROM qa_categories WHERE backpath=_utf8 'c_utf8 'Q'' LIMIT 1) AND type=_utf8 '0' ORDER BY qa_posts.created DESC LIMIT 50,#) y ON qa_posts.postid=y.postid) UNION ALL (SELECT '1', qa_posts.postid, qa_posts.categoryid, qa_posts.type, LEFT(qa_posts.type,1), INSTR(qa_posts.type, '_HIDDEN')>0, qa_posts.acount, qa_posts.selchildid, qa_posts.upvotes, qa_posts.downvotes, qa_posts.netvotes, qa_posts.views, qa_posts.hotness, qa_posts.flagcount, BINARY qa_posts.title, BINARY qa_posts.tags, UNIX_TIMESTAMP(qa_posts.created), BINARY qa_categories.title, BINARY qa_categories.backpath, qa_posts.userid, qa_posts.cookieid, INET_NTOA(qa_posts.createip), qa_userpoints.points, qa_users.flags, qa_users.level, BINARY qa_users.email, CONVERT(qa_users.handle USING BINARY), qa_users.avatarblobid, qa_users.avatarwidth, qa_users.avatarheight, 'A', aposts.postid, aposts.userid, aposts.cookieid, INET_NTOA(aposts.createip), UNIX_TIMESTAMP(aposts.created), aposts.flagcount, auserpoints.points, ausers.flags, ausers.level, BINARY ausers.email, CONVERT(ausers.handle USING BINARY), BINARY ausers.avatarblobid, ausers.avatarwidth, ausers.avatarheight, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL FROM qa_posts LEFT JOIN qa_categories ON qa_categories.categoryid=qa_posts.categoryid LEFT JOIN qa_users ON qa_posts.userid=qa_users.userid LEFT JOIN qa_userpoints ON qa_posts.userid=qa_userpoints.userid JOIN qa_posts AS aposts ON qa_posts.postid=aposts.parentid LEFT JOIN qa_users AS ausers ON aposts.userid=ausers.userid LEFT JOIN qa_userpoints AS auserpoints ON aposts.userid=auserpoints.userid JOIN (SELECT postid FROM qa_posts WHERE catidpath1=(SELECT categoryid FROM qa_categories WHERE backpath=_utf8 'c_utf8 'A'' LIMIT 1) AND type=_utf8 '0' ORDER BY qa_posts.created DESC LIMIT 50,#) y ON aposts.postid=y.postid WHERE qa_posts.type!='Q_HIDDEN') UNION ALL (SELECT '2', qa_posts.postid, qa_posts.categoryid, qa_posts.type, LEFT(qa_posts.type,1), INSTR(qa_posts.type, '_HIDDEN')>0, qa_posts.acount, qa_posts.selchildid, qa_posts.upvotes, qa_posts.downvotes, qa_posts.netvotes, qa_posts.views, qa_posts.hotness, qa_posts.flagcount, BINARY qa_posts.title, BINARY qa_posts.tags, UNIX_TIMESTAMP(qa_posts.created), BINARY qa_categories.title, BINARY qa_categories.backpath, qa_posts.userid, qa_posts.cookieid, INET_NTOA(qa_posts.createip), qa_userpoints.points, qa_users.flags, qa_users.level, BINARY qa_users.email, CONVERT(qa_users.handle USING BINARY), qa_users.avatarblobid, qa_users.avatarwidth, qa_users.avatarheight, 'C', cposts.postid, cposts.userid, cposts.cookieid, INET_NTOA(cposts.createip), UNIX_TIMESTAMP(cposts.created), cposts.flagcount, cuserpoints.points, cusers.flags, cusers.level, BINARY cusers.email, CONVERT(cusers.handle USING BINARY), BINARY cusers.avatarblobid, cusers.avatarwidth, cusers.avatarheight, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL FROM qa_posts LEFT JOIN qa_categories ON qa_categories.categoryid=qa_posts.categoryid LEFT JOIN qa_users ON qa_posts.userid=qa_users.userid LEFT JOIN qa_userpoints ON qa_posts.userid=qa_userpoints.userid JOIN qa_posts AS parentposts ON qa_posts.postid=(CASE parentposts.type WHEN 'A' THEN parentposts.parentid ELSE parentposts.postid END) JOIN qa_posts AS cposts ON parentposts.postid=cposts.parentid LEFT JOIN qa_users AS cusers ON cposts.userid=cusers.userid LEFT JOIN qa_userpoints AS cuserpoints ON cposts.userid=cuserpoints.userid JOIN (SELECT postid FROM qa_posts WHERE catidpath1=(SELECT categoryid FROM qa_categories WHERE backpath=_utf8 'c_utf8 'C'' LIMIT 1) AND type=_utf8 '0' ORDER BY qa_posts.created DESC LIMIT 50,#) y ON cposts.postid=y.postid WHERE (qa_posts.type!='Q_HIDDEN') AND (parentposts.type!='A_HIDDEN')) UNION ALL (SELECT '3', qa_posts.postid, qa_posts.categoryid, qa_posts.type, LEFT(qa_posts.type,1), INSTR(qa_posts.type, '_HIDDEN')>0, qa_posts.acount, qa_posts.selchildid, qa_posts.upvotes, qa_posts.downvotes, qa_posts.netvotes, qa_posts.views, qa_posts.hotness, qa_posts.flagcount, BINARY qa_posts.title, BINARY qa_posts.tags, UNIX_TIMESTAMP(qa_posts.created), BINARY qa_categories.title, BINARY qa_categories.backpath, qa_posts.userid, qa_posts.cookieid, INET_NTOA(qa_posts.createip), qa_userpoints.points, qa_users.flags, qa_users.level, BINARY qa_users.email, CONVERT(qa_users.handle USING BINARY), qa_users.avatarblobid, qa_users.avatarwidth, qa_users.avatarheight, LEFT(editposts.type, 1), editposts.postid, editposts.lastuserid, editposts.cookieid, INET_NTOA(editposts.lastip), UNIX_TIMESTAMP(editposts.updated), editposts.flagcount, edituserpoints.points, editusers.flags, editusers.level, BINARY editusers.email, CONVERT(editusers.handle USING BINARY), BINARY editusers.avatarblobid, editusers.avatarwidth, editusers.avatarheight, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL FROM qa_posts LEFT JOIN qa_categories ON qa_categories.categoryid=qa_posts.categoryid LEFT JOIN qa_users ON qa_posts.userid=qa_users.userid LEFT JOIN qa_userpoints ON qa_posts.userid=qa_userpoints.userid JOIN qa_posts AS parentposts ON qa_posts.postid=IF(parentposts.type IN ('Q', 'Q_HIDDEN'), parentposts.postid, parentposts.parentid) JOIN qa_posts AS editposts ON parentposts.postid=IF(editposts.type IN ('Q', 'Q_HIDDEN'), editposts.postid, editposts.parentid) LEFT JOIN qa_users AS editusers ON editposts.lastuserid=editusers.userid LEFT JOIN qa_userpoints AS edituserpoints ON editposts.lastuserid=edituserpoints.userid JOIN (SELECT postid FROM qa_posts WHERE catidpath1=(SELECT categoryid FROM qa_categories WHERE backpath=_utf8 'c0' LIMIT 1) AND type IN ('Q', 'A', 'C') ORDER BY qa_posts.updated DESC LIMIT 50,#) y ON editposts.postid=y.postid WHERE parentposts.type IN ('Q', 'A', 'C') AND qa_posts.type IN ('Q', 'A', 'C')) UNION ALL (SELECT '4', NULL, qa_categories.categoryid, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, BINARY qa_categories.title, BINARY qa_categories.tags, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, qa_categories.parentid, qa_categories.qcount, qa_categories.position, NULL, NULL, NULL, NULL, NULL FROM qa_categories JOIN (SELECT NULL AS parentkey UNION SELECT grandparent.parentid FROM qa_categories JOIN qa_categories AS parent ON qa_categories.parentid=parent.categoryid JOIN qa_categories AS grandparent ON parent.parentid=grandparent.categoryid WHERE qa_categories.backpath=_utf8 'c#' UNION SELECT parent.parentid FROM qa_categories JOIN qa_categories AS parent ON qa_categories.parentid=parent.categoryid WHERE qa_categories.backpath=_utf8 'c#' UNION SELECT parentid FROM qa_categories WHERE backpath=_utf8 'c#' UNION SELECT categoryid FROM qa_categories WHERE backpath=_utf8 'c#') y ON qa_categories.parentid<=>parentkey ORDER BY qa_categories.position) UNION ALL (SELECT '5', NULL, categoryid, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL FROM qa_categories WHERE backpath=_utf8 'c#') UNION ALL (SELECT '_options', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, title, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, BINARY content, NULL, NULL, NULL, NULL FROM qa_options) UNION ALL (SELECT '_time', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, UNIX_TIMESTAMP(NOW()), NULL, NULL, NULL, NULL) UNION ALL (SELECT '_navpages', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, BINARY title, BINARY tags, NULL, NULL, NULL, NULL, NULL, NULL, NULL, flags, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, position, NULL, pageid, nav, NULL, NULL FROM qa_pages WHERE nav IN (_utf8 'B',_utf8 'M',_utf8 'O',_utf8 'F') ORDER BY position) UNION ALL (SELECT '_widgets', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, BINARY title, tags, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, position, NULL, NULL, NULL, widgetid, place FROM qa_widgets ORDER BY position) Error 1064: 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 'Q'' LIMIT 1) AND type=_utf8 '0' ORDER BY qa_posts.created DESC LIMIT 50,#) y ON ' at line 1