• I get this error message that comes and goes… it always seems to rectify itself eventually… but have no idea what it is:

    WordPress database error:* [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 ‘AND comment_approved = ‘1” at line 1]
    |SELECT COUNT(comment_ID) FROM wp_comments WHERE comment_post_ID = AND comment_approved = ‘1’;|

    does anyone know the fix or have you seen it before?

    Chiefmonkey

Viewing 2 replies - 1 through 2 (of 2 total)
  • Where exactly do you get this error? I’m assuming on the blog, and not the admin pages.

    I suspect it’s the comments_popup_link() function/template tag, since it implements this SELECT expression. Any chance the template tag is being used outside The Loop? The error is apparently due to a missing post id value, which is why I ask.

    Thread Starter chiefmonkey

    (@chiefmonkey)

    Kafkaesqui,

    Thanks for replying mate

    I’ve never knowing made any changes to the php with reference to Comments

    It’s kind of hard to pin down since it comes and goes

    It’s on my site right now… but I don’t have any comments waiting for apporoval, so why the error is pointing towards a an “id” is issing i dont know

    ho hum, i thought this might be a tricky one

    ;O)

    Chiefmonkey

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sporadic MYSql error’ is closed to new replies.