WordPress.org

Ready to get started?Download WordPress

Forums

Database errors on single post pages (3 posts)

  1. lucahack
    Member
    Posted 9 years ago #

    I'm getting a database error message when I click on a single-post page on my blog:

    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 'ORDER BY post_date ASC LIMIT 0,1' at line 1]
    SELECT ID,post_title FROM dailyhey_posts WHERE post_date > '' AND post_date < '2005-08-04 19:47:23' AND post_status = 'publish' AND ID != ORDER BY post_date ASC LIMIT 0,1

    This error first appeared when I upgraded from 1.2 to 1.5. Upgrading to 1.5.1.3 did not fix it. It appears despite the selected theme. I have another blog running off the same database where the error does not occur. I am stumped.

    The error in action:
    http://www.lucubus.com/?p=676

  2. Kafkaesqui

    Posted 9 years ago #

    It's occuring in the <head> portion of your template.

    Do you have a plugin displaying next and previous <link> tags, or something like that? I ask because the only SQL in WP that matches your error output is found in the get_next_post() function, and the only reason for that to appear in the <head> is if it's outputting a "next" relationship link tag.

  3. lucahack
    Member
    Posted 9 years ago #

    Aha! You got it. I had the plugin Link Rel running. Deactivating it made the error go away. I can't quite remember why I installed it in the first place, but that's a different problem. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic