Here's one I used:

Example of Php program invoking a PL/SQL anonymous block.  The block can
then call a PL/SQL compiled function or stored procedure on the
server.  The OCIBindByName function is used to pass values into or out
of the PL/SQL anonymous block.  In this example, a compiled PL/SQL
function on PRD1 (get_eicsum) is invoked.  Two variables are passed
in (SCC and SIC) and one is returned (result).

<?php
   $conn = OCILogon("scott","tiger","PRD1");

   $result = 0;
   $scc = 12345678;
   $sic = 1234;

   $stmt = OCIParse($conn, "begin :x := get_eicsum(:a, :b); end;");
   OCIBindByName($stmt, ":x", &$result, 10);
   OCIBindByName($stmt, ":a", &$scc,     9);
   OCIBindByName($stmt, ":b", &$sic,     5);
   OCIExecute($stmt);
   
   echo "Result: $result<BR>";

   OCIFreeStatement($stmt);
   OCILogoff($conn);
?>




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to