|
Posted by Kim on 12/07/07 10:25
On Dec 4, 11:40 am, "John" <jo...@faramir.nl> wrote:
> Hi,
>
> I'm trying to connect to a SQLite3 database for days now but I'm stuck. PHP
> returns an error that I made a "call to undefined function sqlite_open(). In
> the php.ini the extension=php_pdo.dll and extension=php_sqlite.dll are set.
> What am I doing wrong???
>
> Thank you in advance,
> John
SQLite3 is only supported with PDO in PHP 5.
As you have found out, 2 lines must be added to the php.ini file:
extension=php_pdo.dll
extension=php_sqlite.dll
When you want to connect to a SQLite3 Database you do this:
$dbh = new PDO('sqlite:<path_to_DBfile>');
$results = $dbh->Query("<your_query>");
while ($row = $results->Fetch(PDO::FETCH_ASSOC)) {
// stuff
}
See http://www.php.net/manual/en/ref.pdo.php for more details.
Navigation:
[Reply to this message]
|