#46001 [Opn->Bgs]: $pdo->prepare() always returns PDOStatement object
| From: | johannes@php.net | Date: | Fri, 05 Sep 2008 13:41:52 +0000 |
| Subject: | #46001 [Opn->Bgs]: $pdo->prepare() always returns PDOStatement object | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-128703@lists.php.net to get a copy of this message | ||
ID: 46001
Updated by: johannes@php.net
Reported By: alx at ok dot ru
-Status: Open
+Status: Bogus
Bug Type: PDO related
Operating System: Windows XP
PHP Version: 5.2.6
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
You're using emulated prepared statements, the parser in PDO's
emulation doesn't know about valid SQL so it accepts everything,
depending on the driver you can disable emulation to use native prepared
statements.
Previous Comments:
------------------------------------------------------------------------
[2008-09-05 10:38:33] alx at ok dot ru
Description:
------------
$pdo->prepare() always returns PDOStatement object
Reproduce code:
---------------
<?php
$pdo=new PDO(...);
$sth=$pdo->prepare('La la la');
print_r($sth);
?>
Expected result:
----------------
FALSE
Actual result:
--------------
PDOStatement Object ( [queryString] => La la la )
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46001&edit=1