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

 ID:                 63631
 Updated by:         m...@php.net
 Reported by:        mamatkazin at spb dot orw dot ru
 Summary:            PDO_PGSQL: bindParam and bindValue not working
 Status:             Feedback
 Type:               Bug
 Package:            PDO related
 Operating System:   linux
 PHP Version:        5.4.9
 Block user comment: N
 Private report:     N

 New Comment:

1.) Please provide a complete reproduce script.
2.) Now is that about PDO_PGSQL or PDO_ODBC? Your subject differs from the 
error 
message...


Previous Comments:
------------------------------------------------------------------------
[2013-08-21 09:36:08] pretorian at km dot ru

Test: version php 5.4.18 
Code:
$stmt=$dbh->prepare(“query_with_param_?”);
$stmt->bindParam(1, $param, PDO::PARAM_INT); // or bindValue
$stmt->execute();
$result=$stmt->fetchAll(PDO::FETCH_NUM|PDO::FETCH_COLUMN);

Error in log:

(mod_fastcgi.c.2699) FastCGI-stderr: SQLSTATE[22P02]: Invalid text 
representation: 7 ERROR: invalid input syntax for integer: "";
Error while executing the query (SQLExecute[7] at 
/tmp/php-5.4.18/ext/pdo_odbc/odbc_stmt.c:254)

------------------------------------------------------------------------
[2013-08-20 12:52:00] m...@php.net

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.




------------------------------------------------------------------------
[2012-11-28 07:31:41] mamatkazin at spb dot orw dot ru

Description:
------------
OS Linux, PHP 5.4.8 and 5.4.9, PostgreSQL 9.2.1,
Probably, bindParam and bindValue not working.

Code:
$stmt=$dbh->prepare(“query_with_param_?”);
$stmt->bindParam(1, $param, PDO::PARAM_STR); // or bindValue
$stmt->execute();
$result=$stmt->fetchAll(PDO::FETCH_NUM|PDO::FETCH_COLUMN);

Expected result:
$result - is not empty;
Actual result:
$result - empty

Test script:
---------------
$stmt=$dbh->prepare(“query_with_param_?”);
$stmt->bindParam(1, $param, PDO::PARAM_STR); // or bindValue
$stmt->execute();
$result=$stmt->fetchAll(PDO::FETCH_NUM|PDO::FETCH_COLUMN);

Expected result:
----------------
$result - is not empty;


Actual result:
--------------
$result - empty


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



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

Reply via email to