mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
example enhancement
func correction in see also git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@148550 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
317e9da449
commit
cd9ab9a910
1 changed files with 5 additions and 3 deletions
|
@ -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 @@ Escaped string: Zak\'s and Derick\'s Laptop
|
|||
<para>
|
||||
See also
|
||||
<function>mysql_escape_string</function> and
|
||||
<function>mysql_character_set_name</function>.
|
||||
<function>mysql_client_encoding</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
Loading…
Reference in a new issue