Oracle Execute Function

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

 



Hello All,

I have this Oracle function, and within my code I call it like this:

$sql = "BEGIN :result := my_funtion_name('$parm1', $parm2, null, null, null); END;";
       $stmt = $db->parse($sql);
       $rc = null;
       ocibindbyname($stmt, ":result", &$rc);
       $db->execute($stmt, $sql);

The problem is that the execute function spits back an error/warning message, but the Oracle function properly executes and the data is in the Database.
The execute function looks like this:
(This function enters the conditional where ii executes the die() function)

public function execute($stmt, $query = "") {
               if( $this->trans)
                       $result = @ociexecute($stmt, OCI_DEFAULT);
               else
                       $result = @ociexecute($stmt);
               if (!$result ) {
                       $error = ocierror($this->link);
$this->report('Invalid Statement: ' . $stmt .'('.$query.')'. ' '
                               . htmlentities($error['message']));
die('Invalid Statement: ' . $stmt .'('.$query.')'. ' ' . htmlentities($error['message']));
               }
               return $result;
       }

I use this wrapper class for many things, and the execute function for many things, without any problems.
Now, this is an initial run at calling Oracle functions within PHP.
Any words of wisdom as to what could be causing this problem, or any other insight?

TIA
-Brad

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux