Title: SQL error
Last modified: March 3, 2018

---

# SQL error

 *  Resolved [mishash](https://wordpress.org/support/users/mishash/)
 * (@mishash)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/sql-error-38/)
 * Hi,
    After installing the plugin a couple of days ago, I noticed in the log the
   following errors: [Fri Mar 02 06:46:27.305851 2018] [fcgid:warn] [pid 22399] [
   client 24.232.170.6:34867] mod_fcgid: stderr: 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 ‘) >= datetime’ at line 1 for
   query DELETE FROM wp_iqblock_logging WHERE DATE_SUB(CURDATE(),INTERVAL DAY) >
   = datetime; made by activate_plugin, include_once(‘/plugins/iq-block-country/
   iq-block-country.php’), iqblockcountry_clean_db, referer: [http://www.example.com/blog/wp-admin/plugins.php](http://www.example.com/blog/wp-admin/plugins.php)
 * I guess this is something to fix in the next version…
    Cheers,
 * Mike

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

 *  Plugin Author [Pascal](https://wordpress.org/support/users/iqpascal/)
 * (@iqpascal)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/sql-error-38/#post-10066734)
 * I’ll check. I don’t believe I’ve seen these errors on my installations so far.
 * Do you know which version of MySQL or MariaDB you are using? You should be able
   to find this on the Tools tab.
 *  Thread Starter [mishash](https://wordpress.org/support/users/mishash/)
 * (@mishash)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/sql-error-38/#post-10066893)
 * MySQL Database Version: 5.5.55-0ubuntu0.14.04.1
    MySQL Client Version: 5.5.55
 *  Plugin Author [Pascal](https://wordpress.org/support/users/iqpascal/)
 * (@iqpascal)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/sql-error-38/#post-10078332)
 * I have created a different SQL statement that perhaps works better with MySQL
   5.5.x.

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

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

 * ![](https://ps.w.org/iq-block-country/assets/icon-128x128.png?rev=3136019)
 * [iQ Block Country](https://wordpress.org/plugins/iq-block-country/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/iq-block-country/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/iq-block-country/)
 * [Active Topics](https://wordpress.org/support/plugin/iq-block-country/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/iq-block-country/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/iq-block-country/reviews/)

## Tags

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

 * 3 replies
 * 2 participants
 * Last reply from: [Pascal](https://wordpress.org/support/users/iqpascal/)
 * Last activity: [8 years, 2 months ago](https://wordpress.org/support/topic/sql-error-38/#post-10078332)
 * Status: resolved