mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
document flags values for ora_fetch_into
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@80312 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
54df4a2c02
commit
f5d960c69a
1 changed files with 16 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/oracle.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.ora-fetch-into">
|
||||
<refnamediv>
|
||||
|
@ -17,21 +17,31 @@
|
|||
</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
You can fetch a row into an array with this function.
|
||||
Fetches a row of data into an array. The <parameter>flags</parameter>
|
||||
has two flag values: if the <constant>ORA_FETCHINTO_NULLS</constant>
|
||||
flag is set, columns with <constant>NULL</constant> values are set
|
||||
in the array; and if the <constant>ORA_FETCHINTO_ASSOC</constant>
|
||||
flag is set, an associative array is created.
|
||||
</para>
|
||||
<para>
|
||||
Returns the number of columns fetched.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Oracle fetch into array</title>
|
||||
<title><function>ora_fetch_into()</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
array($results);
|
||||
ora_fetch_into($cursor, &$results);
|
||||
$results = array();
|
||||
ora_fetch_into($cursor, $results);
|
||||
echo $results[0];
|
||||
echo $results[1];
|
||||
ora_fetch_into($cursor, $results, ORA_FETCHINTO_NULLS|ORA_FETCHINTO_ASSOC);
|
||||
echo $results['MyColumn'];
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
Note that you need to fetch the array by reference.
|
||||
</para>
|
||||
<simpara>
|
||||
See also <function>ora_parse</function>,<function>ora_exec</function>,
|
||||
|
|
Loading…
Reference in a new issue