Bug #52489 [NEW]: PDOStatement::execute() errors when querying for backslash and question mark
| From: | untold69 at hotmail dot com | Date: | Thu, 29 Jul 2010 15:48:29 +0000 |
| Subject: | Bug #52489 [NEW]: PDOStatement::execute() errors when querying for backslash and question mark | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-152942@lists.php.net to get a copy of this message | ||
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