note 52454 rejected from function.mysql-real-escape-string by betz

From: Date: Tue, 03 May 2005 07:40:01 +0000
Subject: note 52454 rejected from function.mysql-real-escape-string by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-88888@lists.php.net to get a copy of this message
Note Submitter: laacz at laacz dot lv ---- 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. But MySQL manual for mysql_real_escape_string API function states, that: 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 withing string is NOT encoded in any way. And PHP interpreter calls mysql_real_esacpe_string, NOT mysql_escape_string.

« previous php.notes (#88888) next »