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:
jim winstead 2002-04-29 00:39:52 +00:00
parent 54df4a2c02
commit f5d960c69a

View file

@ -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>,