I have written the code to access the SQLite datbase but its giving me FATAL ERROR.
i would be glad if you guys could help me out.
<?php
// create new database (OO interface)
$db = new SQLiteDatabase("db.sqlite"
;
// create table foo and insert sample data
$db->query("BEGIN;
CREATE TABLE foo(id INTEGER PRIMARY KEY, name CHAR(255));
INSERT INTO foo (name) VALUES('Ilia');
INSERT INTO foo (name) VALUES('Ilia2');
INSERT INTO foo (name) VALUES('Ilia3');
COMMIT;"
;
// execute a query
$result = $db->query("SELECT * FROM foo"
;
// iterate through the retrieved rows
while ($result->valid()) {
// fetch current row
$row = $result->current();
print_r($row);
// proceed to next row
$result->next();
}