philip          Wed Jan 22 02:08:16 2003 EDT

  Modified files:              
    /phpdoc/en/reference/oci8/functions ocifetchinto.xml 
  Log:
  result no longer passes by reference at call time as of PHP 4.2.0 which 
  closes bug #21813.  Also added an example.
  
  
Index: phpdoc/en/reference/oci8/functions/ocifetchinto.xml
diff -u phpdoc/en/reference/oci8/functions/ocifetchinto.xml:1.2 
phpdoc/en/reference/oci8/functions/ocifetchinto.xml:1.3
--- phpdoc/en/reference/oci8/functions/ocifetchinto.xml:1.2     Wed Apr 17 02:42:18 
2002
+++ phpdoc/en/reference/oci8/functions/ocifetchinto.xml Wed Jan 22 02:08:15 2003
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
 <!-- splitted from ./en/functions/oci8.xml, last change in rev 1.2 -->
   <refentry id="function.ocifetchinto">
    <refnamediv>
@@ -11,7 +11,7 @@
      <methodsynopsis>
       <type>int</type><methodname>OCIFetchInto</methodname>
       <methodparam><type>int</type><parameter>stmt</parameter></methodparam>
-      <methodparam><type>array &amp;</type><parameter>result</parameter></methodparam>
+      <methodparam><type>array </type><parameter>result</parameter></methodparam>
       <methodparam 
choice="opt"><type>int</type><parameter>mode</parameter></methodparam>
      </methodsynopsis>
     <para>
@@ -22,11 +22,20 @@
      <parameter>result</parameter> will contain a zero-based array of all
      columns that are not &null;.
     </para>
-       <para>
-        The <parameter>mode</parameter> parameter allows you to change the
-        default behaviour. You can specify more than one flag by simply
-        adding them up (eg OCI_ASSOC+OCI_RETURN_NULLS). The known flags
-        are:
+    <note>
+     <para>
+      Prior to PHP 4.2.0, the <parameter>result</parameter> parameter is 
+      passed in by reference at call time.  So in these older versions of
+      PHP you'd use <varname>&$row</varname> in our example below.  See
+      also <link linkend="ini.allow-call-time-pass-reference">
+      allow_call_time_pass_reference</link>.
+     </para>
+    </note>
+    <para>
+     The <parameter>mode</parameter> parameter allows you to change the
+     default behaviour. You can specify more than one flag by simply
+     adding them up (eg OCI_ASSOC+OCI_RETURN_NULLS). The known flags
+     are:
      <simplelist>
       <member>
        <literal>OCI_ASSOC</literal> Return an associative array.
@@ -43,7 +52,31 @@
        instead of the descriptor.
       </member>
      </simplelist>
-       </para>
+    </para>
+    <para>
+     <example>
+      <title>A simple <function>OCIFetchInto</function> example</title>
+      <programlisting role="php">
+<![CDATA[
+<?php
+$conn = ocilogon("username","password");
+
+$query = "SELECT apples FROM oranges";
+
+$statement = OCIParse ($conn, $query);
+OCIExecute ($statement);
+
+while (OCIFetchInto ($statement, $row, OCI_ASSOC)) {
+    print $row['apples'];
+}
+?>
+]]>
+      </programlisting>
+     </example>
+    </para>
+    <para>
+     See also <function>OCIExecute</function>.
+    </para>
    </refsect1>
   </refentry>
 



-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to