betz            Mon Jan 12 15:39:39 2004 EDT

  Modified files:              
    /phpdoc/en/reference/mysql/functions        mysql-real-escape-string.xml 
  Log:
  example enhancement
  func correction in see also
  
  
Index: phpdoc/en/reference/mysql/functions/mysql-real-escape-string.xml
diff -u phpdoc/en/reference/mysql/functions/mysql-real-escape-string.xml:1.6 
phpdoc/en/reference/mysql/functions/mysql-real-escape-string.xml:1.7
--- phpdoc/en/reference/mysql/functions/mysql-real-escape-string.xml:1.6        Mon 
Dec 15 11:52:07 2003
+++ phpdoc/en/reference/mysql/functions/mysql-real-escape-string.xml    Mon Jan 12 
15:39:39 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
 <!-- splitted from ./en/functions/mysql.xml, last change in rev 1.100 -->
   <refentry id="function.mysql-real-escape-string">
    <refnamediv>
@@ -33,8 +33,10 @@
       <programlisting role="php">
 <![CDATA[
 <?php
+$link = mysql_connect("localhost", "mysql_user", "mysql_password")
+    or die("Could not connect: " . mysql_error());
 $item = "Zak's and Derick's Laptop";
-$escaped_item = mysql_real_escape_string($item);
+$escaped_item = mysql_real_escape_string($item, $link);
 printf("Escaped string: %s\n", $escaped_item);
 ?>
 ]]>
@@ -52,7 +54,7 @@
     <para>
      See also
      <function>mysql_escape_string</function> and
-     <function>mysql_character_set_name</function>.
+     <function>mysql_client_encoding</function>.
     </para>
    </refsect1>
   </refentry>

Reply via email to