Edit report at https://bugs.php.net/bug.php?id=48877&edit=1

 ID:                 48877
 Comment by:         mar...@php.net
 Reported by:        siegmar at siegmar dot com dot br
 Summary:            "bindValue" and "bindParam" do not work for PDO
                     Firebird
 Status:             Closed
 Type:               Bug
 Package:            PDO related
 Operating System:   Windows
 PHP Version:        5.2.10
 Assigned To:        mariuz
 Block user comment: N
 Private report:     N

 New Comment:

tested and result was 2


cat test.php 
<?php
$connection = new 
PDO('firebird:dbname=localhost:/var/lib/firebird/2.5/data/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 />";
?>


Previous Comments:
------------------------------------------------------------------------
[2011-12-10 22:20:51] mar...@php.net

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.



------------------------------------------------------------------------
[2011-12-10 22:09:41] mar...@php.net

Automatic comment from SVN on behalf of mariuz
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=320856
Log: bug fixed #48877 - bindValue and bindParam do not work for PDO Firebird

------------------------------------------------------------------------
[2011-12-10 22:08:20] mar...@php.net

Automatic comment from SVN on behalf of mariuz
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=320855
Log: bug fixed #48877 - bindValue and bindParam do not work for PDO Firebird

------------------------------------------------------------------------
[2011-12-10 22:04:04] mar...@php.net

Automatic comment from SVN on behalf of mariuz
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=320854
Log: bug fixed #48877 - bindValue and bindParam do not work for PDO Firebird

------------------------------------------------------------------------
[2010-07-04 05:14:44] ssufficool at gmail dot com

Try changing the :empno to just empno in bind* it is not expected or needed:

$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

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=48877


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=48877&edit=1

Reply via email to