From:             siegmar at siegmar dot com dot br
Operating system: Windows
PHP version:      5.2.10
PHP Bug Type:     PDO related
Bug description:  "bindValue" and "bindParam" do not work for PDO Firebird

Description:
------------
The "bindValue" and "bindParam" do not work for PDO Firebird if we use
named parameters (:parameter) but do work for question marks parameters
(?).






Reproduce code:
---------------
<?php
$connection = new
PDO('firebird:dbname=localhost:C:\Firebird\EMPLOYEE.FDB', 'SYSDBA',
'masterkey');

$value = '2';

//$command = $connection->prepare('SELECT EMP_NO FROM EMPLOYEE WHERE
EMP_NO = :empno');
//$command->bindParam(':empno', $value, PDO::PARAM_STR); // does not work
//$command->bindValue(':empno', $value, PDO::PARAM_STR); // does not work

$command = $connection->prepare('SELECT EMP_NO FROM EMPLOYEE WHERE EMP_NO
= ?');
$command->bindParam('1', $value, PDO::PARAM_STR); // works
//$command->bindValue('1', $value, PDO::PARAM_STR); // works

$command->execute();
$dataset = $command->fetchAll();
foreach($dataset as $record)
  echo $record[0] . "<br />";
?>

The same code works perfectly for MySQL.

Expected result:
----------------
Using the example database "EMPLOYEE.FDB" you sould see:

2




Actual result:
--------------
nothing

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

Reply via email to