Question
March 21, 2007 at 09:31 AM
miriam.bryan

calling a PL/SQL function from PHP in ORACLE 10G R2

by miriam.bryan . Updated 19 years, 4 months ago

I am able to call the function without any issues from SQL Developer as such

SELECT getOwnerDetails(22421).getClobVal() FROM dual;
The issue lies with calling the PL/SQL function from PHP via the query above. When I execute the query above via PHP I get:

Here’s my Function:

create or replace FUNCTION getOwnerDetailsAsXML( p_cursor IN sys_refcursor )

RETURN CLOB IS

v_clob CLOB;

v_ctx dbms_xmlgen.ctxhandle;

BEGIN

v_ctx := dbms_xmlgen.newcontext( p_cursor );

dbms_xmlgen.setnullhandling(v_ctx, 1);

v_clob := dbms_xmlgen.getxml(v_ctx);

dbms_xmlgen.closecontext(v_ctx);

RETURN v_clob;

END;

Uncaught exception: oci8 error: [22806: ORA-22806: not an object or REF] in EXECUTE(“SELECT getOwnerDetails(22421).getClobVal() FROM dual”)

This discussion is locked

All Comments