mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
a216052f5b
commit
872743f839
1 changed files with 31 additions and 1 deletions
|
@ -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: <input type="file" name="lob_upload"><br>
|
|||
OCIFreeStatement($stmt);
|
||||
OCILogoff($conn);
|
||||
}
|
||||
?>
|
||||
</programlisting>
|
||||
</example>
|
||||
<example>
|
||||
<title>OCINewDescriptor</title>
|
||||
<programlisting>
|
||||
<?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>
|
||||
|
|
Loading…
Reference in a new issue