From:             h dot spuur at gmail dot com
Operating system: Win2003 Server
PHP version:      5.2.0RC1
PHP Bug Type:     InterBase related
Bug description:  Unexpected ibase_query() with bound argument placeholder 
error.

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.


-- 
Edit bug report at http://bugs.php.net/?id=38256&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=38256&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=38256&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=38256&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=38256&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=38256&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=38256&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=38256&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=38256&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=38256&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=38256&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=38256&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=38256&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=38256&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=38256&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=38256&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=38256&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=38256&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=38256&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=38256&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=38256&r=mysqlcfg

Reply via email to