php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2559 OCIBindByName doesn't work
Submitted: 1999-10-18 07:35 UTC Modified: 2006-07-17 08:07 UTC
From: smweb at ihost dot de Assigned:
Status: Closed Package: OCI8 related
PHP Version: 4.0 Beta 2 OS: SuSE Linux 6.2
Private report: No CVE-ID: None
 [1999-10-18 07:35 UTC] smweb at ihost dot de
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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-10-18 09:03 UTC] thies at cvs dot php dot net
should be fixed in CVS
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC