Bug #63631 [NEW]: bindParam and bindValue not working
| From: | mamatkazin at spb dot orw dot ru | Date: | Wed, 28 Nov 2012 07:31:41 +0000 |
| Subject: | Bug #63631 [NEW]: bindParam and bindValue not working | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-174981@lists.php.net to get a copy of this message | ||
From: mamatkazin at spb dot orw dot ru
Operating system: linux
PHP version: 5.4.9
Package: PDO related
Bug Type: Bug
Bug description:bindParam and bindValue not working
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 bug report at https://bugs.php.net/bug.php?id=63631&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63631&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63631&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63631&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=63631&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=63631&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=63631&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=63631&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=63631&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=63631&r=support
Expected behavior: https://bugs.php.net/fix.php?id=63631&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=63631&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=63631&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=63631&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63631&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=63631&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=63631&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=63631&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63631&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=63631&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=63631&r=mysqlcfg