Bug #48877 [Com]: "bindValue" and "bindParam" do not work for PDO Firebird

2011-12-28 Thread janis dot volbergs at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=48877&edit=1

 ID: 48877
 Comment by: janis dot volbergs at gmail dot com
 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:

FYI. This issue exists in 5.3.6 as well.


PHP 5.3.6 with Suhosin-Patch (cli) (built: Sep  8 2011 19:34:00) 
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies


Previous Comments:

[2011-12-28 09:40:37] mar...@php.net

Automatic comment from SVN on behalf of mariuz
Revision: http://svn.php.net/viewvc/?view=revision&revision=321461
Log: cleanup for bug 48877 test, add description


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

Automatic comment from SVN on behalf of mariuz
Revision: http://svn.php.net/viewvc/?view=revision&revision=321433
Log: PDO_Firebird: bug 48877 test


[2011-12-27 10:48:39] mar...@php.net

Automatic comment from SVN on behalf of mariuz
Revision: http://svn.php.net/viewvc/?view=revision&revision=321432
Log: added test for PDO_Firebird: bug 48877


[2011-12-12 06:33:24] mar...@php.net

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


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

tested and result was 2


cat test.php 
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] . "";
?>




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


Bug #48877 [Com]: "bindValue" and "bindParam" do not work for PDO Firebird

2011-12-10 Thread mar...@php.net
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 
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] . "";
?>


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&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&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&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


Bug #48877 [Com]: "bindValue" and "bindParam" do not work for PDO Firebird

2010-07-03 Thread ssufficool at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=48877&edit=1

 ID:   48877
 Comment by:   ssufficool at gmail dot com
 Reported by:  siegmar at siegmar dot com dot br
 Summary:  "bindValue" and "bindParam" do not work for PDO
   Firebird
 Status:   Open
 Type: Bug
 Package:  PDO related
 Operating System: Windows
 PHP Version:  5.2.10

 New Comment:

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


Previous Comments:

[2009-07-10 02:35:29] siegmar at siegmar dot com dot br

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:
---
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] . "";

?>



The same code works perfectly for MySQL.

Expected result:

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



2







Actual result:
--
nothing






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