Document temporary lob support (dbenson).

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@57703 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
David Benson 2001-09-17 20:55:19 +00:00
parent a216052f5b
commit 872743f839

View file

@ -1,5 +1,5 @@
<?xml encoding="iso-8859-1"?>
<!-- $Revision: 1.31 $ -->
<!-- $Revision: 1.32 $ -->
<reference id="ref.oci8">
<title>Oracle 8 functions</title>
<titleabbrev>OCI8</titleabbrev>
@ -782,6 +782,36 @@ Upload file: &lt;input type="file" name="lob_upload">&lt;br>
OCIFreeStatement($stmt);
OCILogoff($conn);
}
?>
</programlisting>
</example>
<example>
<title>OCINewDescriptor</title>
<programlisting>
&lt;?php
/* Calling PL/SQL stored procedures which contain clobs as input
* parameters (PHP 4 >= 4.0.6).
* Example PL/SQL stored procedure signature is:
*
* PROCEDURE save_data
* Argument Name Type In/Out Default?
* ------------------------------ ----------------------- ------ --------
* KEY NUMBER(38) IN
* DATA CLOB IN
*
*/
$conn = OCILogon($user, $password);
$stmt = OCIParse($conn, "begin save_data(:key, :data); end;");
$clob = OCINewDescriptor($conn, OCI_D_LOB);
OCIBindByName($stmt, ':key', $key);
OCIBindByName($stmt, ':data', $clob, -1, OCI_B_CLOB);
$clob->WriteTemporary($data);
OCIExecute($stmt, OCI_DEFAULT);
OCICommit($conn);
$clob->close();
$clob->free();
OCIFreeStatement($stmt);
?>
</programlisting>
</example>