Incorrect usage of SUBQUERY and feature is disabled

115 words.

I just looked at my home page to find it reporting a database error.  “Incorrect usage of SUBQUERY and feature is disabled by allow_view_trigger_sp_subquery in /etc/my.cnf”.

The select query in question looked like this:

SELECT p.*,

(SELECT COUNT(*) FROM `$t1` WHERE ParentID=p.ID) AS `NumComments`,

(SELECT MAX(PublishedDate) FROM `$t1` WHERE ParentID=p.ID) AS `NewestCommentDate`

FROM `$t1` p

Looks like my web host disabled sub-queries for some inexplicable reason and naturally I don’t have the ability to turn it back on.  So it’s back to the drawing board.  Posts won’t show the number of comments until I resolve this (I know, it’ll be a big hardship).

(P.S. Red, I’ll be pulling out Eclipse again to fix this. :)

Related

This page is a static archival copy of what was originally a WordPress post. It was converted from HTML to Markdown format before being built by Hugo. There may be formatting problems that I haven't addressed yet. There may be problems with missing or mangled images that I haven't fixed yet. There may have been comments on the original post, which I have archived, but I haven't quite worked out how to show them on the new site.

Sorry, new comments are disabled on older posts. This helps reduce spam. Active commenting almost always occurs within a day or two of new posts.