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->saveAnalysis
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
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘PHP Error: You have an error in your SQL syntax’ is closed to new replies.