How to fetch data from an Oracle sys_refcursor via PHP?

1

I have a Package with a function where the return of it is a sys_refcursor :

FUNCTION getConfigPlaca(placa_aux VARCHAR2) RETURN sys_refcursor;

If I refer this function with a "from dual" I get:

{<SENSOR=1,LIMITE_MAXIMO=+28,LIMITE_MINIMO=+24,LIMITE_ATIVO=0>,<SENSOR=2,LIMITE_MAXIMO=+40,LIMITE_MINIMO=+01,LIMITE_ATIVO=0>,}

I can not handle this data correctly by searching through PHP, could anyone give me a clue how I can proceed?

    
asked by anonymous 10.03.2015 / 20:47

1 answer

0

In php there is an OCI8 library, which is used for example for this type of problem.

In php.net you have an example of how to use this return type which is a data type that exists only in ORACLE. In your case you would use the oci_new_cursor that allocates and returns a cursor.

Explanation link: [ link

    
12.03.2015 / 14:47