But it seems PHP5 underwent a big change in "PDO" for SQLite.
I went around the houses looking at errors like "Class 'SQLite3' not found php" and " Fatal error: Call to undefined function sqlite_open()"
But... finally I found: http://djhweb.co.uk/sqlite1.htm
So I had to change the code:
Then:$db = sqlite_open('filename',0666)to$db = new PDO('filename');
$res = sqlite_query($db, $query, SQLITE_ASSOC);to$res = $db->query($query);
And:
I might have got some of this wrong... but hopefully not!
$row=sqlite_fetch_array($res);to$row=$res->fetch(PDO::FETCH_ASSOC);
If you hit "SQLSTATE[HY000] [14] unable to open database file" then that means you need to open up read/write permissions on the database directory.
Please post your full code
ReplyDeleteMy full code from February 2010?! You'll be lucky!
Delete