• Resolved jjpcmp

    (@jjpcmp)


    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 . 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

    (@jjpcmp)

    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

    (@jjpcmp)

    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.