PROBABLY BUG OF PEAR OCI CLASS
| From: | Fabio Lo Giudice | Date: | Mon, 22 Sep 2003 15:06:12 +0000 |
| Subject: | PROBABLY BUG OF PEAR OCI CLASS | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-21898@lists.php.net to get a copy of this message | ||
I'm a web developer in php and i'm tryng
to call oracle stored procedure with the PEAR DB
interface.
The problem is:
i call a strode procedure that have 1 IN parameter and 1 OUT parameter,
When I call the execute mehod and i read the value of the out parameter
i can read only the first character of the out parameter value.
I think that the problem is due to the call
if (!@OCIBindByName($stmt, ":bind" . $i, $pdata[$i], -1)) {
of the execute method of class DB_oci8 in which the length parameter is always 1.
I'm trying specify a length more than 0 and it seems to works, but the question is:
"How is the correct way to do this call".???
Thank in advance!!
My example code is:
$stmt = $DBH->prepare ("call stored_proc (?,?,?)");
if (DB::isError ($stmt))
die ("prepare() failed: " . $stmt->getMessage () . "\n");
$param=array($in_par,&$out_par);
$result = $DBH->execute ($stmt,$param);
if (DB::isError($result)) {
print "execute() failed: " . $result->getMessage() . "\n";
}