mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
documented mysqli_set-local-infile-default(),
updated mysqli_set-local-infile-handler() example. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@250534 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
50aba4e9e3
commit
e2c8f20606
2 changed files with 39 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<refentry xml:id="mysqli.set-local-infile-default" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>mysqli::set_local_infile_default</refname>
|
||||
|
@ -14,10 +14,41 @@
|
|||
<methodparam><type>mysqli</type><parameter>link</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
&warn.undocumented.func;
|
||||
Deactivates a <literal>LOAD DATA INFILE LOCAL</literal> handler previously
|
||||
set with <function>mysqli_set_local_infile_handler</function>.
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
&mysqli.link.description;
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>See <function>mysqli_set_local_infile_handler</function> examples</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>mysqli_set_local_infile_handler</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<refentry xml:id="mysqli.set-local-infile-handler" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>mysqli::set_local_infile_handler</refname>
|
||||
|
@ -107,11 +107,12 @@
|
|||
return strlen($buffer);
|
||||
}
|
||||
|
||||
$db->set_local_infile_handler("callme");
|
||||
|
||||
echo "Input:\n";
|
||||
|
||||
$db->set_local_infile_handler("callme");
|
||||
$db->query("LOAD DATA LOCAL INFILE 'input.txt' INTO TABLE t1");
|
||||
$db->set_local_infile_default();
|
||||
|
||||
$res = $db->query("SELECT * FROM t1");
|
||||
|
||||
|
@ -143,14 +144,16 @@
|
|||
return strlen($buffer);
|
||||
}
|
||||
|
||||
mysqli_set_local_infile_handler($db, "callme");
|
||||
|
||||
echo "Input:\n";
|
||||
|
||||
mysqli_set_local_infile_handler($db, "callme");
|
||||
mysqli_query($db, "LOAD DATA LOCAL INFILE 'input.txt' INTO TABLE t1");
|
||||
mysqli_set_local_infile_default($db);
|
||||
|
||||
$res = mysqli_query($db, "SELECT * FROM t1");
|
||||
|
||||
|
||||
echo "\nResult:\n";
|
||||
while ($row = mysqli_fetch_assoc($res)) {
|
||||
echo join(",", $row)."\n";
|
||||
|
|
Loading…
Reference in a new issue