A MySQL connection is required before using mysql_real_escape_string().

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@183132 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Philip Olson 2005-03-30 02:07:56 +00:00
parent a51b10b253
commit dc6fde3196

View file

@ -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: