Title: SQL error since 3.1 update
Last modified: July 1, 2017

---

# SQL error since 3.1 update

 *  Resolved [jjbte](https://wordpress.org/support/users/jjbte/)
 * (@jjbte)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/sql-error-since-3-1-update/)
 * I’m seeing the following error in my error log from time to time since updating
   to 3.1:
 * `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 comment_type != 'webhook_delivery' ORDER BY comment_date_gmt DESC LIMIT 5'
   at line 1 for query SELECT wp_comments.* FROM wp_comments AND comment_type !='
   webhook_delivery' ORDER BY comment_date_gmt DESC LIMIT 50 made by require('wp-
   blog-header.php'), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->
   get_posts`
 * I have not yet been able to pinpoint what pages are loaded, etc., when the error
   occurs. I will update with that info if I can narrow it down.

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

 *  Plugin Contributor [Mike Jolley](https://wordpress.org/support/users/mikejolley/)
 * (@mikejolley)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/sql-error-since-3-1-update/#post-9279541)
 * [https://github.com/woocommerce/woocommerce/pull/15862](https://github.com/woocommerce/woocommerce/pull/15862)
 *  Thread Starter [jjbte](https://wordpress.org/support/users/jjbte/)
 * (@jjbte)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/sql-error-since-3-1-update/#post-9280365)
 * TY 🙂

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

The topic ‘SQL error since 3.1 update’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [sql-error](https://wordpress.org/support/topic-tag/sql-error/)

 * 2 replies
 * 2 participants
 * Last reply from: [jjbte](https://wordpress.org/support/users/jjbte/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/sql-error-since-3-1-update/#post-9280365)
 * Status: resolved