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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: h dot spuur at gmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Tue May 13 07:01:26 2025 UTC