Do I need to add the 'symbol to the mysql statement? 'The mysql statement with this symbol can avoid errors when the field name or table name is a keyword of the SQL statement. However, this system can only use the MYSQL database. if you want to change the database, do we need to add these statements to the development system ?, 'Is the mysql escape character. do you want to add the' symbol if you are not in the mysql statement?
'The mysql statement with this symbol can avoid errors when the field name or table name is a keyword of the SQL statement. However, this system can only use the MYSQL database. if you want to change the database, do we need to add these statements to the development system?
------ Solution --------------------
'Is the mysql escape character. you do not need to escape it if you do not use the reserved words or Chinese characters of mysql in the column name or table name.
Other databases also have reserved words, which also need to be escaped if used, but the escape characters are different.
As long as you do not use reserved words, you do not need to escape them.
------ Solution --------------------
It only means that you have not performed code design on the database operation.
PHP code
Class database {public function Quote ($ t) {return $ t;} class mysql extends database {public funciton Quote ($ t) {return "'". $ t. "'" ;}} class sqlite extends database {}