What characters have to be escaped to prevent (My)SQL injections?

前端 未结 6 826
温柔的废话
温柔的废话 2020-11-29 05:47

I\'m using MySQL API\'s function

mysql_real_escape_string()

Based on the documentation, it escapes the following characters:



        
6条回答
  •  长情又很酷
    2020-11-29 06:11

    Where user input contains tabulators or backspace characters?

    It's quite remarkable a fact that up to this day most users do believe that it's user input have to be escaped, and such escaping "prevents injections".

提交回复
热议问题