pl/sql collection(table) into php array
244103Feb 7 2008 — edited Aug 11 2008I 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