Title: WordPress database error on post
Last modified: August 18, 2016

---

# WordPress database error on post

 *  Resolved [jjpcmp](https://wordpress.org/support/users/jjpcmp/)
 * (@jjpcmp)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/wordpress-database-error-on-post/)
 * I get an error on posting:
 * 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‘
   AND category_id != 2 AND wp_posts.ID = wp_post2cat.post_id AND ID != ‘ at line
   4]
    SELECT ID, post_title, post_date, post_category FROM wp_posts, wp_post2cat
   WHERE post_author = AND category_id != 2 AND wp_posts.ID = wp_post2cat.post_id
   AND ID != AND post_status = ‘publish’ ORDER BY post_date DESC LIMIT 5
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/jcbjvbj/public_html/wp-includes/wp-db.php:102) in /home/jcbjvbj/public_html/
   wp-admin/post.php on line 60
 * I know that it is not my webhost (MySQL version) because I have two other WordPress
   sites with the same host that are fine.
 * The error does not prevent posts from being entered into the database or from
   displaying correctly as you can see: [http://www.huntersonline.info](http://www.huntersonline.info).
   However…it is awfully annoying to have an error message pop up everytime a family
   member posts.
 * Any ideas on how to fix this?

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

 *  Thread Starter [jjpcmp](https://wordpress.org/support/users/jjpcmp/)
 * (@jjpcmp)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/wordpress-database-error-on-post/#post-412153)
 * Update: It has something to do with the two plugins: subscribe2 and wp-email-
   notification. With both of them off I get zero errors. With subscribe2 activated
   I get this error:
 * 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‘
   AND category_id != 2 AND wp_posts.ID = wp_post2cat.post_id AND ID != ‘ at line
   4]
    SELECT ID, post_title, post_date, post_category FROM wp_posts, wp_post2cat
   WHERE post_author = AND category_id != 2 AND wp_posts.ID = wp_post2cat.post_id
   AND ID != AND post_status = ‘publish’ ORDER BY post_date DESC LIMIT 5
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/jcbjvbj/public_html/wp-includes/wp-db.php:102) in /home/jcbjvbj/public_html/
   wp-admin/post.php on line 60
 *  Thread Starter [jjpcmp](https://wordpress.org/support/users/jjpcmp/)
 * (@jjpcmp)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/wordpress-database-error-on-post/#post-412186)
 * Resolved: Posted here if anyone else gets this error.
 * You cannot use either subscribe2 or wp-email-notification plugins with the posts-
   by-author plugin. Something the plugin does messes with the way posts are handled
   and causes errors.

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

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

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 1 participant
 * Last reply from: [jjpcmp](https://wordpress.org/support/users/jjpcmp/)
 * Last activity: [19 years, 11 months ago](https://wordpress.org/support/topic/wordpress-database-error-on-post/#post-412186)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
