A syntax error occurred today while doing the Web application operations database, prompting a syntax error near "xxxxxxx": CODE:Error:You has an error inyour SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' s XXXXX. When encountering this error, remember to follow these two steps to troubleshoot errors:
1. Simple syntax error. Check to see if there are errors in Chinese and English symbols near "XXXXX" in the error message (pay special attention to the space and semicolon), and then check for misspelled words or spelling inconsistencies with the defined attributes (database name, property name, etc.) in the database, and if so, correct This error is the simplest, but it must be careful enough to find out.
2. database reserved word error. if it is not the above error, that you are sure that there is no Chinese and English symbol errors and spelling errors, then you can refer to this recommendation: Observe the object property name in the query statement, whether there is a database of reserved words, that is, the database reserved word for the data object property name, This error does not know that the fact is not found. This was the kind of mistake I encountered, and I was named after the name of my data object property, and I checked it out overnight. In order to prevent some friends have not contacted the database reserved word, I specifically posted below, we can probably browse, to avoid the future of this error has not been aware.
Common database reserved word list
The above are the master of their own learning process, hope to give you a certain guidance role, useful also hope that we point a support, if you do not use also hope to include, there are mistakes please point out, thank you!
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Database operation syntax error two steps away