Re: ORACLE FUNCTION

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux