Error in manual: mysql_real_escape_string
| From: | Kaspars Foigts | Date: | Tue, 03 May 2005 08:45:00 +0000 |
| Subject: | Error in manual: mysql_real_escape_string | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969368166@lists.php.net to get a copy of this message | ||
There is an error in function reference. Sentence is:
mysql_real_escape_string() calls MySQL's library function
mysql_escape_string, which prepends backslashes to the following
characters: NULL, \x00, \n, \r, \, ', " and \x1a.
http://www.php.net/mysql_real_escape_string
But MySQL manual for mysql_real_escape_string API function (which is
the one PHP's function calls, not deprecated mysql_escape_string, as
stated in manual) says:
Characters encoded are NUL (ASCII 0), '\n', '\r', '\',
''', '"', and
Control-Z.
http://dev.mysql.com/doc/mysql/en/mysql-real-escape-string.html
Note that NULL within strings is NOT encoded in any way. And again -
PHP interpreter calls mysql_real_esacpe_string, NOT
mysql_escape_string.
--
Kaspars
http://laacz.lv/