Title: Database errors on single post pages
Last modified: August 18, 2016

---

# Database errors on single post pages

 *  [lucahack](https://wordpress.org/support/users/lucahack/)
 * (@lucahack)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/database-errors-on-single-post-pages/)
 * 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](http://www.lucubus.com/?p=676)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/database-errors-on-single-post-pages/#post-244096)
 * 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.
 *  Thread Starter [lucahack](https://wordpress.org/support/users/lucahack/)
 * (@lucahack)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/database-errors-on-single-post-pages/#post-244103)
 * 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!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Database errors on single post pages’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [single](https://wordpress.org/support/topic-tag/single/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [lucahack](https://wordpress.org/support/users/lucahack/)
 * Last activity: [20 years, 10 months ago](https://wordpress.org/support/topic/database-errors-on-single-post-pages/#post-244103)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
