note 106156 deleted from function.sqlite-open by danbrown
| From: | danbrown@php.net | Date: | Fri, 14 Oct 2011 14:04:24 +0000 |
| Subject: | note 106156 deleted from function.sqlite-open by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-183884@lists.php.net to get a copy of this message | ||
Note Submitter: Alexandre Valiquette
----
If you get "file is encrypted or is not a database" read this
(http://stackoverflow.com/questions/1513849/error-file-is-encrypted-or-is-not-a-database) and try
this example (http://henryranch.net/software/ease-into-sqlite-3-with-php-and-pdo/).
Basically you will do something like:
$db = new PDO('sqlite:mydatabase.db');
$rows = $db->query('SELECT * FROM mytable');
foreach ($rows as $row)
{
print_r($row);
}