note 55201 added to function.ocinewdescriptor

From: Date: Wed, 27 Jul 2005 14:43:01 +0000
Subject: note 55201 added to function.ocinewdescriptor
Groups: php.notes 
Request: Send a blank email to php-notes+get-92561@lists.php.net to get a copy of this message
Here is an example of retrieving a CLOB as an output parameter from a stored procedure. This is a bit hack-y and maybe there's a cleaner way to do this, but I couldn't find one. The following definitely works with Oracle 9: // the query to call the procedure, which includes declaring the // output parameter and assigning the result to a variable to be bound. $qry = ' declare clob_out clob; begin myprocedure(someparam_in, clob_out); :myclob := clob_out; end; '; // parse the query and bind the 'myclob' variable $sth = OCIParse($conn,$qry); $myclob = OCINewDescriptor($conn,OCI_D_LOB); OCIBindByName($sth,":myclob",$myclob,-1,OCI_B_CLOB); OCIExecute($sth); // display the results echo $myclob->load(); ---- Manual Page -- http://www.php.net/manual/en/function.ocinewdescriptor.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+55201 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55201&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55201&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55201&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55201&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55201&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55201&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+55201&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#92561) next »