mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
RQuadling : Undocumented feature
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@223800 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
ea7d065115
commit
8432ea1cc4
1 changed files with 78 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/uodbc.xml, last change in rev 1.29 -->
|
||||
<refentry id='function.odbc-next-result'>
|
||||
<refnamediv>
|
||||
|
@ -15,7 +15,83 @@
|
|||
<methodparam><type>resource</type><parameter>result_id</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
&warn.undocumented.func;
|
||||
<function>odbc_next_result</function> will return &true; if there are more result sets
|
||||
available as well as allowing access to the next result set via
|
||||
<function>odbc_fetch_array</function>, <function>odbc_fetch_row</function>,
|
||||
<function>odbc_result</function>, etc.
|
||||
</para>
|
||||
<para>
|
||||
This function will return &false; on error.
|
||||
</para>
|
||||
<para>
|
||||
The argument is a valid result identifier returned by <function>odbc_exec</function>.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>odbc_next_result</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$r_Connection = odbc_connect($dsn, $username, $password);
|
||||
|
||||
$s_SQL = <<<END_SQL
|
||||
SELECT 'A'
|
||||
SELECT 'B'
|
||||
SELECT 'C'
|
||||
END_SQL;
|
||||
|
||||
$r_Results = odbc_exec($r_Connection, $s_SQL);
|
||||
|
||||
$a_Row1 = odbc_fetch_array($r_Results);
|
||||
$a_Row2 = odbc_fetch_array($r_Results);
|
||||
echo "Dump first result set";
|
||||
var_dump($a_Row1, $a_Row2);
|
||||
|
||||
echo "Get second results set ";
|
||||
var_dump(odbc_next_result($r_Results));
|
||||
|
||||
$a_Row1 = odbc_fetch_array($r_Results);
|
||||
$a_Row2 = odbc_fetch_array($r_Results);
|
||||
echo "Dump second result set ";
|
||||
var_dump($a_Row1, $a_Row2);
|
||||
|
||||
echo "Get third results set ";
|
||||
var_dump(odbc_next_result($r_Results));
|
||||
|
||||
$a_Row1 = odbc_fetch_array($r_Results);
|
||||
$a_Row2 = odbc_fetch_array($r_Results);
|
||||
echo "Dump third result set ";
|
||||
var_dump($a_Row1, $a_Row2);
|
||||
|
||||
echo "Try for a fourth result set ";
|
||||
var_dump(odbc_next_result($r_Results));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Dump first result set array(1) {
|
||||
["A"]=>
|
||||
string(1) "A"
|
||||
}
|
||||
bool(false)
|
||||
Get second results set bool(true)
|
||||
Dump second result set array(1) {
|
||||
["B"]=>
|
||||
string(1) "B"
|
||||
}
|
||||
bool(false)
|
||||
Get third results set bool(true)
|
||||
Dump third result set array(1) {
|
||||
["C"]=>
|
||||
string(1) "C"
|
||||
}
|
||||
bool(false)
|
||||
Try for a fourth result set bool(false)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
Loading…
Reference in a new issue