MySQL 5.6 C API Developer Guide
This function should not be used. Use
mysql_real_escape_string()
instead.
mysql_escape_string()
is
identical to
mysql_real_escape_string()
except that
mysql_real_escape_string()
takes
a connection handler as its first argument and escapes the
string according to the current character set.
mysql_escape_string()
does not
take a connection argument and does not respect the current
character set.