philip Tue Mar 29 21:07:57 2005 EDT
Modified files: /phpdoc/en/reference/mysql/functions mysql-real-escape-string.xml Log: A MySQL connection is required before using mysql_real_escape_string(). http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-real-escape-string.xml?r1=1.20&r2=1.21&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-real-escape-string.xml diff -u phpdoc/en/reference/mysql/functions/mysql-real-escape-string.xml:1.20 phpdoc/en/reference/mysql/functions/mysql-real-escape-string.xml:1.21 --- phpdoc/en/reference/mysql/functions/mysql-real-escape-string.xml:1.20 Wed Sep 29 12:26:30 2004 +++ phpdoc/en/reference/mysql/functions/mysql-real-escape-string.xml Tue Mar 29 21:07:56 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.20 $ --> +<!-- $Revision: 1.21 $ --> <!-- splitted from ./en/functions/mysql.xml, last change in rev 1.100 --> <refentry id="function.mysql-real-escape-string"> <refnamediv> @@ -35,6 +35,15 @@ <function>mysql_query</function>. If binary data is to be inserted, this function must be used. </para> + <note> + <para> + A MySQL connection is required before using + <function>mysql_real_escape_string</function> otherwise an error of + level <literal>E_WARNING</literal> is generated, and &false; is + returned. If <parameter>link_identifier</parameter> isn't defined, the + last MySQL connection is used. + </para> + </note> <para> <function>mysql_real_escape_string</function> calls MySQL's library function mysql_escape_string, which prepends backslashes to the following characters: