Title: Switching Themes &#8211;  Database error
Last modified: August 18, 2016

---

# Switching Themes – Database error

 *  [southbeach030](https://wordpress.org/support/users/southbeach030/)
 * (@southbeach030)
 * [18 years, 11 months ago](https://wordpress.org/support/topic/switching-themes-database-error/)
 * I was switching Themes, and I got this error:
 * Anyone know where I should start looking to fix this problem?
 * WordPress database error: [Not unique table/alias: ‘wp_post2cat’]
    SELECT DISTINCT*
   FROM wp_posts LEFT JOIN wp_postmeta ON wp_posts.ID = wp_postmeta.post_id LEFT
   JOIN wp_post2cat ON (wp_posts.ID = wp_post2cat.post_id) LEFT JOIN wp_categories
   ON (wp_post2cat.category_id = wp_categories.cat_ID) LEFT JOIN wp_post2cat ON (
   wp_posts.ID = wp_post2cat.post_id) LEFT JOIN wp_catt_visibility ON (wp_post2cat.
   category_id = wp_catt_visibility.catt_ID) WHERE 1=1 AND 0=1 AND (category_id 
   = ‘0’) AND post_date_gmt <= ‘2007-06-21 21:27:52’ AND (post_status = ‘publish’
   OR post_author = 1 AND post_status != ‘draft’ AND post_status != ‘static’) AND
   post_status != ‘attachment’ AND ((wp_catt_visibility.front=1 AND wp_catt_visibility.
   cv_user_level<=10) OR post_status=’static’ OR wp_catt_visibility.catt_ID IS NULL)
   GROUP BY wp_posts.ID ORDER BY post_date DESC LIMIT 0, 1

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

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [18 years, 11 months ago](https://wordpress.org/support/topic/switching-themes-database-error/#post-583759)
 * Category Visibility plugin not activated?
 *  Thread Starter [southbeach030](https://wordpress.org/support/users/southbeach030/)
 * (@southbeach030)
 * [18 years, 11 months ago](https://wordpress.org/support/topic/switching-themes-database-error/#post-583767)
 * I actually solved the problem. It was two-fold.
 * 1) I had to update the Category Visibility plugin to 1.0e
    2) then I realized
   that the theme I spent 5 hours working on (porting the layout from the old one)
   was designed for WORDPRESS 2.1.X+ (I’m still on 2.0.X)
 * I should have realized that sooner.
 * Unrelated question: Does anyone know if someone is working on a similar plugin
   for Quoting Comments? The reason I haven’t upgraded to 2.2.X yet is because I
   rely on the Quoter plugin, and it’s not supported.

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

The topic ‘Switching Themes – Database error’ is closed to new replies.

## Tags

 * [Database Error](https://wordpress.org/support/topic-tag/database-error/)
 * [switching](https://wordpress.org/support/topic-tag/switching/)
 * [Themes](https://wordpress.org/support/topic-tag/themes/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [southbeach030](https://wordpress.org/support/users/southbeach030/)
 * Last activity: [18 years, 11 months ago](https://wordpress.org/support/topic/switching-themes-database-error/#post-583767)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
