#36923 [Com]: PDO::query fails when query contains special charactes
| From: | gizmo dot rafal at poczta dot fm | Date: | Thu, 04 Oct 2007 11:24:18 +0000 |
| Subject: | #36923 [Com]: PDO::query fails when query contains special charactes | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-118183@lists.php.net to get a copy of this message | ||
ID: 36923
Comment by: gizmo dot rafal at poczta dot fm
Reported By: farin at refresh dot cz
Status: No Feedback
Bug Type: PDO related
Operating System: Gentoo
PHP Version: 5.1.2
New Comment:
I have same issue on my PHP Version 5.2.3-0.dotdeb.1 with PDO Driver
for MySQL, client library version 5.0.41.
Previous Comments:
------------------------------------------------------------------------
[2007-08-09 22:36:01] apike at sfu dot ca
This is still happening for me with PHP 5.2.0.
------------------------------------------------------------------------
[2006-04-07 01:00:00] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2006-03-30 13:29:53] tony2001@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.1-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.1-win32-latest.zip
------------------------------------------------------------------------
[2006-03-30 13:27:39] farin at refresh dot cz
Description:
------------
When $query parameter for PDO::query contains
' :A and ? (as part of data) query fails with error
Invalid parameter number: mixed named and positional parameters. This
behavior is appear with PDO mysql driver. In PHP 5.1.1 is not this bug
present.
Reproduce code:
---------------
$pdo->query("insert into foo (bar) values ('\\ ? :A')");
Expected result:
----------------
SQL syntax is Ok so query should be proccessed without error.
Actual result:
--------------
Warning: PDO::query() [function.query]: SQLSTATE[HY093]: Invalid
parameter number: mixed named and positional parameters in ...
And query fails.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36923&edit=1