Title: Error code
Last modified: August 18, 2016

---

# Error code

 *  [haussamen](https://wordpress.org/support/users/haussamen/)
 * (@haussamen)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/error-code-2/)
 * Hi,
 * When I click on a post on the site I’m building – to view the entire posting 
   or the permalink, where the posting should appear I get the error “not found.”
   At the top of my page, in the header, I get this code:
 * 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 DESC’ at line 1]
    SELECT wp_posts.* FROM wp_posts WHERE 1=
   1 AND ID = 6 AND (post_type = ‘post’) AND ((wp_catt_visibility.archives=1 AND
   wp_catt_visibility.cv_user_level<=’10’) OR post_type=’page’ OR wp_catt_visibility.
   catt_ID IS NULL ORDER BY post_date DESC
 * Any idea how to fix this?

The topic ‘Error code’ is closed to new replies.

## Tags

 * [error message](https://wordpress.org/support/topic-tag/error-message/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [haussamen](https://wordpress.org/support/users/haussamen/)
 * Last activity: [18 years, 9 months ago](https://wordpress.org/support/topic/error-code-2/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
