note 74139 added to ref.pdo-sqlite
| From: | gopal at gopalarathnam dot com | Date: | Tue, 27 Mar 2007 10:36:30 +0000 |
| Subject: | note 74139 added to ref.pdo-sqlite | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-124836@lists.php.net to get a copy of this message | ||
If you get an error reporting "invalid resource" when trying to query the database table
and looping through it, the version of the SQLite extension compiled in to PHP might be incompatible
with the version that had created the database (like SQLite 2.x vs 3.x).
The database open itself might be successful, failing only when querying.
$dbh = new PDO('sqlite:/tmp/foo.db'); // success
foreach ($dbh->query('SELECT * FROM bar') as $row) // prints invalid resource
// ...
----
Server IP: 69.147.83.197
Probable Submitter: 202.46.19.2
----
Manual Page -- http://www.php.net/manual/en/ref.pdo-sqlite.php
Edit -- https://master.php.net/note/edit/74139
Del: integrated -- https://master.php.net/note/delete/74139/integrated
Del: useless -- https://master.php.net/note/delete/74139/useless
Del: bad code -- https://master.php.net/note/delete/74139/bad+code
Del: spam -- https://master.php.net/note/delete/74139/spam
Del: non-english -- https://master.php.net/note/delete/74139/non-english
Del: in docs -- https://master.php.net/note/delete/74139/in+docs
Del: other reasons-- https://master.php.net/note/delete/74139
Reject -- https://master.php.net/note/reject/74139
Search -- https://master.php.net/manage/user-notes.php