Title: PHP Error: You have an error in your SQL syntax
Last modified: August 30, 2016

---

# PHP Error: You have an error in your SQL syntax

 *  Resolved [Nickname](https://wordpress.org/support/users/patrickalthaus/)
 * (@patrickalthaus)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/php-error-you-have-an-error-in-your-sql-syntax/)
 * Hi there
 * I just want to share the issue I had and the fix I found for it as the “Alexander
   Schneider” link does not work anymore on the plugin update page.
 * **Symptom**
    The following PHP error is logged:
 *     ```
       [03-Nov-2015 16:08:47 UTC] 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 'blabla text',
                           read_access = 'group',
                 ' at line 3 for query UPDATE wp_7_uam_accessgroups
                       SET groupname = 'group-name',
                           groupdesc = 'Description d'un groupe',
                           read_access = 'group',
                           write_access = 'group',
                           ip_range = ''
                       WHERE ID = 7 made by edit_post, wp_update_post, wp_insert_post, do_action('save_post'), call_user_func_array, UserAccessManager->savePostData, UserAccessManager->_saveObjectData, UamUserGroup->save
       ```
   
 * **Analysis**
    The third line shows the groupdesc text which contains a single
   quote “d’un” and which is of course wrongly interpreted by the SQL parser.
 * **Workaround**
    Replace the single quote “d’un” by an escape code “d\’un”.
 * I hope this can help somebody else. 🙂
 * Cheers
 * [https://wordpress.org/plugins/user-access-manager/](https://wordpress.org/plugins/user-access-manager/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [Nickname](https://wordpress.org/support/users/patrickalthaus/)
 * (@patrickalthaus)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/php-error-you-have-an-error-in-your-sql-syntax/#post-6712805)
 * Problem solved.

Viewing 1 replies (of 1 total)

The topic ‘PHP Error: You have an error in your SQL syntax’ is closed to new replies.

 * ![](https://ps.w.org/user-access-manager/assets/icon.svg?rev=1563783)
 * [User Access Manager](https://wordpress.org/plugins/user-access-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/user-access-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/user-access-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/user-access-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/user-access-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/user-access-manager/reviews/)

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [single-quote](https://wordpress.org/support/topic-tag/single-quote/)

 * 1 reply
 * 1 participant
 * Last reply from: [Nickname](https://wordpress.org/support/users/patrickalthaus/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/php-error-you-have-an-error-in-your-sql-syntax/#post-6712805)
 * Status: resolved