note 57394 deleted from function.pdo-query by betz
| From: | betz@php.net | Date: | Mon, 03 Oct 2005 08:35:32 +0000 |
| Subject: | note 57394 deleted from function.pdo-query by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-96232@lists.php.net to get a copy of this message | ||
Note Submitter: AJG
----
PDO::query() seems to return FALSE when there is an error, instead of a PDOStatement object. This is
a problem, because then you can't access the errorCode and errorInfo for that query.
This is a bug, as the return value should be always an object. I'm using PDO RC1 with PDO_MYSQL
RC1, via dl(). Your mileage may vary.
The workaround I'm trying is to use prepared statements, which are more trouble than a simple
query() method.