Title: SQL Error unknown column &#8216;status&#8217;
Last modified: December 14, 2016

---

# SQL Error unknown column ‘status’

 *  Resolved [dcrosbie](https://wordpress.org/support/users/dcrosbie/)
 * (@dcrosbie)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/sql-error-unknown-column-status/)
 * When I activate the plugin I get this error. But then I hit refresh and it works
   ok the 2nd time. Same thing whenever I login or log out, I get this error the
   first time, then after refresh it goes through fine:
 * Database Error; SQL: SELECT DISTINCT `t`.* FROM `wp_posts` AS `t` WHERE ( ( status
   =’pending’ ) AND ( `t`.`post_type` = “media_award_nominati” ) AND ( `t`.`post_status`
   IN ( “publish” ) ) ) ORDER BY `t`.`menu_order`, `t`.`post_title`, `t`.`post_date`;
   Response: Unknown column ‘status’ in ‘where clause’
 * When I deactivate the plugin I get no errors when I log in or log out.
 * I am using v1.9 for this plugin. I don’t beleive I was getting this error in 
   a few months ago when I was at a lower version of either the plugin or wordpress
   or both.

Viewing 1 replies (of 1 total)

 *  Plugin Author [nsp-code](https://wordpress.org/support/users/nsp-code/)
 * (@nsp-code)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/sql-error-unknown-column-status/#post-8551162)
 * This is not a problem caused by this plugin, as it does not change any sql queries
   except order by.
    However i suggest to you check the “status” and which code 
   use that, since there’s no column named that way within your wp_posts, but a 
   post_status
 * Thanks

Viewing 1 replies (of 1 total)

The topic ‘SQL Error unknown column ‘status’’ is closed to new replies.

 * ![](https://ps.w.org/post-types-order/assets/icon-128x128.png?rev=1226428)
 * [Post Types Order](https://wordpress.org/plugins/post-types-order/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-types-order/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-types-order/)
 * [Active Topics](https://wordpress.org/support/plugin/post-types-order/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-types-order/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-types-order/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [nsp-code](https://wordpress.org/support/users/nsp-code/)
 * Last activity: [9 years, 5 months ago](https://wordpress.org/support/topic/sql-error-unknown-column-status/#post-8551162)
 * Status: resolved