Title: SQL syntax error
Last modified: July 2, 2019

---

# SQL syntax error

 *  Resolved [clickharder](https://wordpress.org/support/users/clickharder/)
 * (@clickharder)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/sql-syntax-error-18/)
 * This may be a multi-site only issue or it may possibly affect all versions. I
   haven’t tested it on a single site version of WordPress.
 * I just ran all my updates on WordPress and the plugin so everything is up to 
   date as of this writing.
    Wordpress 5.2.2 HFCM 1.1.3
 * Here is the database error I am getting:
    “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 ‘IF’ at line 1 ” Error Code 1064
 * The error is coming from the SQL statement in the main plugin file in the hfcm_options_install()
   function.
 * If I remove that sql statement (the table is already there…) the error goes away.

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

 *  Plugin Support [DraftPress Support Team](https://wordpress.org/support/users/99robotsteam/)
 * (@99robotsteam)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/sql-syntax-error-18/#post-11763469)
 * Hello [@clickharder](https://wordpress.org/support/users/clickharder/) – We will
   be looking into this. As we have not received any similar tickets & we ourselves
   have the plugin on a few multi-sites as well as single sites & we have not encountered
   this problem, we are thinking this is more of an isolated plugin/theme conflict
   issue – either way, we will do a thorough round of testing to check this out.
 *  Plugin Support [DraftPress Support Team](https://wordpress.org/support/users/99robotsteam/)
 * (@99robotsteam)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/sql-syntax-error-18/#post-11835539)
 * Hello [@clickharder](https://wordpress.org/support/users/clickharder/) – We tested
   this on our end and we were not able to replicate this issue on our multi-site
   test environments after another round of testing. Therefore we are inclined to
   think, this might be a plugin/theme conflict on your end. We have not received
   a reply from you for 3 weeks, therefore we are going ahead and closing this ticket.
   Please feel free to create a new ticket if you need help with anything.
 * Thank you,
 *  [Marco](https://wordpress.org/support/users/michelyweb/)
 * (@michelyweb)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/sql-syntax-error-18/#post-12021009)
 * Hey [@99robotsteam](https://wordpress.org/support/users/99robotsteam/) i can 
   reproduce the problem. It’s on a multisite also.
    I see it in Query Monitor. 
   Here’s a screenshot: [http://snpy.in/UZjDFz](http://snpy.in/UZjDFz)
 * Here you can see the System Info: [http://snpy.in/URNBjl](http://snpy.in/URNBjl)
    -  This reply was modified 6 years, 7 months ago by [Marco](https://wordpress.org/support/users/michelyweb/).

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

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

 * ![](https://ps.w.org/header-footer-code-manager/assets/icon-256x256.png?rev=2681303)
 * [Header Footer Code Manager](https://wordpress.org/plugins/header-footer-code-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/header-footer-code-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/header-footer-code-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/header-footer-code-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/header-footer-code-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/header-footer-code-manager/reviews/)

## Tags

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

 * 3 replies
 * 3 participants
 * Last reply from: [Marco](https://wordpress.org/support/users/michelyweb/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/sql-syntax-error-18/#post-12021009)
 * Status: resolved