jimw Sun Apr 28 20:39:55 2002 EDT
Modified files:
/phpdoc/en/reference/oracle/functions ora-fetch-into.xml
Log:
document flags values for ora_fetch_into
Index: phpdoc/en/reference/oracle/functions/ora-fetch-into.xml
diff -u phpdoc/en/reference/oracle/functions/ora-fetch-into.xml:1.2
phpdoc/en/reference/oracle/functions/ora-fetch-into.xml:1.3
--- phpdoc/en/reference/oracle/functions/ora-fetch-into.xml:1.2 Wed Apr 17 02:42:31
2002
+++ phpdoc/en/reference/oracle/functions/ora-fetch-into.xml Sun Apr 28 20:39:52
+2002
@@ -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>,