From 872743f83944acbf06764ba4a7cb42051c044d45 Mon Sep 17 00:00:00 2001 From: David Benson Date: Mon, 17 Sep 2001 20:55:19 +0000 Subject: [PATCH] Document temporary lob support (dbenson). git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@57703 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/oci8.xml | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/functions/oci8.xml b/functions/oci8.xml index fddf9f48c0..4244295d42 100644 --- a/functions/oci8.xml +++ b/functions/oci8.xml @@ -1,5 +1,5 @@ - + Oracle 8 functions OCI8 @@ -782,6 +782,36 @@ Upload file: <input type="file" name="lob_upload"><br> OCIFreeStatement($stmt); OCILogoff($conn); } +?> + + + + OCINewDescriptor + +<?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); ?>