Incorrect usage of SUBQUERY and feature is disabled

By Thomas Krehbiel

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. :)

Reader Comments

Comments are the property of their respective owners.

1. Sean/Red said,

Yay, Eclipse! I'm getting ready to host a Java brown bag at work. I plan to convince everyone to drop .Net and switch. Then we'll take over the world!

2. Sean/Red said,

Hmm, I added a comment. it isn't showing. you've got a lot of work to do :)

3. Tom said,

avatar

Comments are back! I routinely delete "brown bag lunch" emails from my employer at work. :) Besides, aren't you scared Oracle is going to wreck Java??

4. Sean/Red said,

I don't think Oracle will ruin Java. They have been a long time supporter and early adopter. I'm willing to bet they won't change anything about how it evolves. I've got the impression JCP works pretty well.

Add a Comment

Name: (optional)
Comment: