PHP 4.0 Bug #2559: OCIBindByName doesn't work
| From: | smweb at ihost dot de | Date: | Mon, 18 Oct 1999 11:35:54 +0000 |
| Subject: | PHP 4.0 Bug #2559: OCIBindByName doesn't work | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-11736@lists.php.net to get a copy of this message | ||
From: smweb@ihost.de
Operating system: SuSE Linux 6.2
PHP version: 4.0 Beta 2
PHP Bug Type: Oracle related
Bug description: OCIBindByName doesn't work
Oracle Version: 8i (8.1.5)
SuSE Linux Version: 6.2
Hi,
I installed Apache and PHP successfully, but there's the following problem: Normal SELECT
statements and other stuff works perfectly, but just OCIDefineByName doesn't work. When I use
the following code:
=== snip
// query db for number of rows
$stmt = OCIParse($conn, "SELECT COUNT(*) XCOUNT FROM foo WHERE no = 23");
//OCIBindByName($stmt, ":no", &$intNumber, 3);
OCIDefineByName($stmt, "XCOUNT", &$intRows);
OCIExecute($stmt);
OCIFetch($stmt);
OCIFreeStatement($stmt);
=== snip
It works perfectly. But when I change it to this (uncomment the 3rd line and replace the 23 by :no),
there's no answer from PHP and the script seems to hang (or sometimes 'Document contains
no data.'):
=== snip
// query db for number of rows
$stmt = OCIParse($conn, "SELECT COUNT(*) XCOUNT FROM foo WHERE no = :no");
OCIBindByName($stmt, ":no", &$intNumber, -1);
OCIDefineByName($stmt, "XCOUNT", &$intRows);
OCIExecute($stmt);
OCIFetch($stmt);
OCIFreeStatement($stmt);
=== snip
Does anyone experience the same problem? Is there a work-around or solution?
Regards,
- Steffen