Modified: phpdoc/en/trunk/reference/oci8/examples.xml =================================================================== --- phpdoc/en/trunk/reference/oci8/examples.xml 2009-11-19 23:48:27 UTC (rev 291048) +++ phpdoc/en/trunk/reference/oci8/examples.xml 2009-11-20 00:44:45 UTC (rev 291049) @@ -248,6 +248,58 @@ ]]> + + + Calling a PL/SQL function that returns a <literal>REF CURSOR</literal> + + Each returned value from the query is a REF + CURSOR that can be fetched from. + + +\n"; +while (($row = oci_fetch_array($stid, OCI_ASSOC))) { + echo "\n"; + $rc = $row['MFRC']; + oci_execute($rc); // returned column value from the query is a ref cursor + while (($rc_row = oci_fetch_array($rc, OCI_ASSOC))) { + echo " " . $rc_row['CITY'] . "\n"; + } + oci_free_statement($rc); + echo "\n"; +} +echo "\n"; + +// Output is: +// Beijing +// Bern +// Bombay +// Geneva + +oci_free_statement($stid); +oci_close($conn); + +?> +]]> + +