Title: WordPress database error
Last modified: August 19, 2016

---

# WordPress database error

 *  Resolved [trdunsworth](https://wordpress.org/support/users/trdunsworth/)
 * (@trdunsworth)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-error-48/)
 * We upgraded from 2.8.5 I believe to 2.9.1 and since the upgrade, we’ve started
   receiving the following error and now Apache is not serving any of the pages 
   for WP.
 * `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 ASC' at line 1 for query SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN
   wp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN ('category')
   AND (t.term_id <> 1 AND t.term_id <> 7 AND t.term_id <> 10 AND t.term_id <> 13
   t.term_id <> 4 AND t.term_id <> 3 AND t.term_id <> 12 AND t.term_id <> 8 AND 
   t.term_id <> 9 AND t.term_id <> 11 AND t.term_id <> 13 ) ORDER BY order ASC made
   by require, require_once, include, get_sidebar, locate_template, load_template,
   require_once, wp_list_categories, get_categories, get_terms`
 * I’ve never seen this before. We cannot get into the site in any fashion, so it
   looks like we’re going to have to blow it out, but I want to know what we have
   in case we see it again.
 * Thanks much,

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

 *  Thread Starter [trdunsworth](https://wordpress.org/support/users/trdunsworth/)
 * (@trdunsworth)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-error-48/#post-1346003)
 * Actually, just found out from my colleague it is 2.7 instead of a 2.8.X release.
 *  [Samuel B](https://wordpress.org/support/users/samboll/)
 * (@samboll)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-error-48/#post-1346049)
 * 1st try running a repair on the db tables with phpmyadmin
 *  Thread Starter [trdunsworth](https://wordpress.org/support/users/trdunsworth/)
 * (@trdunsworth)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-48/#post-1346358)
 * Checking now. We encountered it again and that suggestion might have fixed it.

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

The topic ‘WordPress database error’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [errors](https://wordpress.org/support/topic-tag/errors/)
 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)
 * [taxonomy](https://wordpress.org/support/topic-tag/taxonomy/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [trdunsworth](https://wordpress.org/support/users/trdunsworth/)
 * Last activity: [16 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-48/#post-1346358)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
