#36053 [NEW]: Multiple params fail with new version of PHP
| From: | tzlee at tzlee dot com | Date: | Tue, 17 Jan 2006 15:19:01 +0000 |
| Subject: | #36053 [NEW]: Multiple params fail with new version of PHP | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-92068@lists.php.net to get a copy of this message | ||
From: tzlee at tzlee dot com
Operating system: Linux
PHP version: 5.1.2
PHP Bug Type: PDO related
Bug description: Multiple params fail with new version of PHP
Description:
------------
Using a param (e.g. :id) more than once in a prepared statement used to
work with my older PHP 5.0.4 (PDO 1.0.2 and PDO_MySQL 1.0.1) but now
breaks with PHP 5.1.2 (using default PDO and PDO_MySQL ext included in
download)
Reproduce code:
---------------
$stmt = $db->prepare("SELECT id, name FROM table WHERE id = :id OR parent
= :id");
$stmt->assignValue(':id', 1, PDO::PARAM_INT);
$stmt->execute();
Expected result:
----------------
Should work
Actual result:
--------------
Failed with General Error
--
Edit bug report at http://bugs.php.net/?id=36053&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36053&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36053&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36053&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36053&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=36053&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=36053&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=36053&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=36053&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=36053&r=support
Expected behavior: http://bugs.php.net/fix.php?id=36053&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=36053&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=36053&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36053&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36053&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36053&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=36053&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=36053&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=36053&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=36053&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=36053&r=mysqlcfg