In the CodeIgniter user guide, I came across this suggestion:
In many databases it is advisable to protect table and field names – for example with backticks in MySQL.
What does it actually refer to? Protecting against …?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To emphasize:
MySQL/SQL have reserved keywords that you can not use to name your tables or table fields or you will receive an error when executing the query. To avoid this, you need to use backtick character eg
`.Example:
Above
GROUP(Assuming you named your field like that without realizing it is reserved keyword) is reserved keyword and for that reason it is wrapped with backtick characters. Same is the case withtableas an example.