From:
Operating system: Windows 7
PHP version: 5.2.14
Package: PDO related
Bug Type: Bug
Bug description:PDOStatement::execute() errors when querying for backslash and
question mark
Description:
------------
Using PDO to prepare and then execute a statement that queries for a
backslash and
then a question mark sequentially in two columns generates a warning.
Test script:
---------------
$pdo = new PDO("mssql:dbname=mydb;host=myhost", "myuser", "mypassword");
$stmt = $pdo->prepare("SELECT * FROM table WHERE column1 = '\' AND column2
= '?'");
$result = $stmt->execute();
Expected result:
----------------
Array or false.
Actual result:
--------------
Warning: PDOStatement::execute() [pdostatement.execute]: SQLSTATE[HY093]:
Invalid
parameter number: no parameters were bound in ...
--
Edit bug report at http://bugs.php.net/bug.php?id=52489&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=52489&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=52489&r=trysnapshot53
Try a snapshot (trunk):
http://bugs.php.net/fix.php?id=52489&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=52489&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=52489&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=52489&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=52489&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=52489&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=52489&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=52489&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=52489&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=52489&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=52489&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=52489&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52489&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=52489&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=52489&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=52489&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=52489&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=52489&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=52489&r=mysqlcfg