I have been able to execute REF CURSORS returned by pl/sql functions succesfully with php. I have also been able to bind collections to the input/output of pl/sql functions/procedures.
However, what I am unable to do, is to execute a cursor returned by a pl/sql function that has one of the columns a named datatype (a simple one-dimensional nested table):
create type stab is table of varchar2(255);
create table lp_landing (
autofollowing stab default stab(),
constraint lp_landing_pk primary key (token)) organization index
nested table autofollowing store as lp_landings_af_nt
(constraint autofollowing_pk primary key (nested_table_id,column_value)) organization index compress
function landings_usercountry (in_uname in lp_users.uname%type, in_country in lp_country.cname%type) return Landing_curType
open ret for
select * --token,text,country,creator,is_active,css_file,tab2str(autofollowing) as autofollowing
where country = (select country
where country = in_country and uname = in_uname);
With "select *" in the function, the autofollowing column (of datatype stab) fails to bind, giving an ORA-932 error. The workaround for the moment is to convert the nested table to a comma delimited string (via the tab2str function).
However, I would like to be able to tell php to accept a collection within the cursor, but I cannot figure out how to do this.