mysql_escape_string VS mysql_real_escape_string

Neenoheenna

New Member
So this is something we all should know about, and played on my mind when I first seen it..I know that \[code\]mysql_escape_string\[/code\] is deprecated from 5.3 but what was the actual difference in \[code\]mysql_real_escape_string\[/code\].What I thought was that \[code\]mysql_real_escape_string\[/code\] is the exact same as \[code\]mysql_escape_string\[/code\] apart from \[code\]mysql_real_escape_string\[/code\] takes a second argument for the mysql resource.so then I thought well surly there must be some difference as to how strings are handled because there would not be a need for 2 functions.So then I thought that the difference was purely down to locale and character encodings. ?can anyone clear this up for me ?
 
Back
Top