php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38256 Unexpected ibase_query() with bound argument placeholder error.
Submitted: 2006-07-30 01:49 UTC Modified: 2006-07-30 10:08 UTC
From: h dot spuur at gmail dot com Assigned:
Status: Not a bug Package: InterBase related
PHP Version: 5.2.0RC1 OS: Win2003 Server
Private report: No CVE-ID: None
 [2006-07-30 01:49 UTC] h dot spuur at gmail dot com
Description:
------------
Running Firebird 2.0RC3 on Win2003 server w/Apache 2.2.2, I get this easily reproduceable error. I seems that ibase_query() now binds the '?' character in some erroneous way.

Reproduce code:
---------------
Table DDL:
- - - - - - - - - - - - - - - - - - - - -
CREATE TABLE "File"(
  "Name" Varchar(252) NOT NULL,
  "Type" Smallint NOT NULL,
  PRIMARY KEY ("Name")
);

INSERT INTO "File"
  ("Name", "Type")
VALUES
  ("This is a filename", 321 );
- - - - - - - - - - - - - - - - - - - - -

$dbh = ibase_pconnect(); // arguments set in php.ini
ibase_query($dbh, 'SELECT "Name" FROM "File" WHERE "Type" = ?', 321);

Returns:
Dynamic SQL Error SQL error code = -104 Token unknown - line 1, column 1 321 )


Expected result:
----------------
I expected to see the same result as running:

ibase_query($dbh, 'SELECT "Name" FROM "File" WHERE "Type" = 321' );

-which returns the correct recordset without hiccups.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-30 10:08 UTC] tony2001@php.net
I don't see any reason why this is a PHP problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 07:01:27 2024 UTC