Re: ORACLE FUNCTION

From: Date: Mon, 03 Nov 2003 01:14:35 +0000
Subject: Re: ORACLE FUNCTION
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-31388@lists.php.net to get a copy of this message
MaNu wrote:
Function : FUNCTION PREZZO_TOT (
       pUtente     in  v_utenti.utente%type,
       pTrasp      in  char               ) return NUMBER;      
Php $query = "SELECT poe.carrello.prezzo_tot('AATCXNK2EN3RDKB','1') PIPPO FROM dual"; $parsed = ociparse($conn,$query); ociexecute($parsed); $numRows = ocifetchstatement($parsed, $result); echo $numRows; --> 1
echo $result["PIPPO"][0]; --> NULL
MaNu, There is nothing obviously wrong with your code. After necessary schema changes, it works fine for me with PHP 4.3.4RC2 against Oracle 9.2. Calling var_dump($result) shows the return value is a string. Is there a PHP number conversion problem? What value are you expecting returned? Maybe you can use DBMS_OUTPUT to see what your PL/SQL function is doing? There is some PHP code to fetch DBMS_OUTPUT in a post to Oracle's PHP forum, see: http://forums.oracle.com/forums/thread.jsp?forum=178&thread=204531 Chris

« previous php.db (#31388) next »