Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

pl/sql collection(table) into php array

244103Feb 7 2008 — edited Aug 11 2008
I have a stored procedure:
procedure show(c in out integer, thesechar out tabvars)

where tabvars is defined as :
create or replace type tabvars is table of varchar2(4000);

I am trying to call this stored procedure and retreive the results into a php array but I can't seem to get it working. Here is a sample of my PHP code :

$sqlx = oci_parse($conn, 'begin phfn.show(:c,:thesechar); end;');
$tabvars = oci_new_collection($conn,'TABVARS');
oci_bind_by_name($sqlx, ':thesechar', $tabvars, -1, SQLT_NTY);
oci_bind_by_name($sqlx, ':c', $c, -1, SQLT_INT);
oci_execute($sqlx);
var_dump($tabvars);

...... The stored procedure itself runs fine and the collection does indeed get populated but the return variable to PHP returns nothing.

Can someone please provide some insight. Thanks in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 8 2008
Added on Feb 7 2008
14 comments
20,003 views