Title: Database error
Last modified: August 19, 2016

---

# Database error

 *  [robin2130](https://wordpress.org/support/users/robin2130/)
 * (@robin2130)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/database-error-42/)
 * I have a database error. I have bridged PHPBB3 with wordpress with WP2bb.
 * > WordPress database error Column ‘post_status’ in where clause is ambiguous 
   > for query SELECT DISTINCT wp_comments.* FROM wp_comments INNER JOIN wp_posts
   > ON wp_posts.ID = wp_comments.comment_post_ID LEFT JOIN wp_posts as parent ON
   > parent.ID = wp_posts.post_parent AND parent.post_type IN (‘post’, ‘page’) AND
   > wp_posts.post_type = ‘attachment’ WHERE ( ( wp_posts.post_type = ‘post’ AND((
   > post_status IN (‘private’, ‘publish’) AND ( ( ( ( 1=2 ) OR ( wp_posts.post_author
   > = ‘1’ ) ) ) ) ) ) AND ( ( wp_posts.post_status IN (‘private’, ‘publish’) AND((((
   > 1=2 ) OR ( wp_posts.post_author = ‘1’ ) ) ) ) ) ) ) OR ( wp_posts.post_type
   > = ‘page’ AND ( ( post_status IN (‘private’, ‘publish’) AND ( ( ( ( 1=2 ) OR(
   > wp_posts.post_author = ‘1’ ) ) ) ) ) ) AND ( ( wp_posts.post_status IN (‘private’,‘
   > publish’) AND ( ( ( ( 1=2 ) OR ( wp_posts.post_author = ‘1’ ) ) ) ) ) ) ) OR(
   > wp_posts.post_type = ‘attachment’ AND parent.post_type = ‘post’ AND ( ( post_status
   > IN (‘private’, ‘publish’) AND ( ( ( ( 1=2 ) OR ( parent.post_author = ‘1’ ))))))
   > AND ( ( parent.post_status IN (‘private’, ‘publish’) AND ( ( ( ( 1=2 ) OR (
   > parent.post_author = ‘1’ ) ) ) ) ) ) ) OR ( wp_posts.post_type = ‘attachment’
   > AND parent.post_type = ‘page’ AND ( ( post_status IN (‘private’, ‘publish’)
   > AND ( ( ( ( 1=2 ) OR ( parent.post_author = ‘1’ ) ) ) ) ) ) AND ( ( parent.
   > post_status IN (‘private’, ‘publish’) AND ( ( ( ( 1=2 ) OR ( parent.post_author
   > = ‘1’ ) ) ) ) ) ) ) ) AND comment_approved = ‘1’ ORDER BY comment_date_gmt 
   > DESC LIMIT 8 made by require, require_once, include, get_sidebar, locate_template,
   > load_template, require_once, dynamic_sidebar, call_user_func_array, WP_Widget-
   > >display_callback, SidebarTabsWidget->widget, get_comments
 * How can I solve this?

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

 *  [alaetra](https://wordpress.org/support/users/alaetra/)
 * (@alaetra)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/database-error-42/#post-1410762)
 * You should specify which table you want the post_status field from. For instance
   for post_status from the table wp_posts use wp_posts.post_status
 *  Thread Starter [robin2130](https://wordpress.org/support/users/robin2130/)
 * (@robin2130)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/database-error-42/#post-1410912)
 * Thank you but how can i do that?

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

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

## Tags

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

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

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
