note 54069 rejected from function.pdo-query by nlopess
| From: | nlopess@php.net | Date: | Thu, 23 Jun 2005 08:13:48 +0000 |
| Subject: | note 54069 rejected from function.pdo-query by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-90819@lists.php.net to get a copy of this message | ||
Note Submitter: schmeic-php at lovo dot org
----
I've noticed that PDO::query doesn't always return a PDOStatement. Using the sqlite3 PDO
driver, I do a simple query on a non-existent table and PDO::query returns FALSE.
select * from non_existent_table
returns FALSE, but
select * from existing_table
returns a PDOStatement object. The same applies to PDO::prepare. This is in 5.1.0b1 code, and the
extension is documented as experimental, so I didn't want to report it as a bug. It is kind of
a bummer that there doesn't seem to be a way to access the error codes, though.