SQLiteDatabase Error ...!
Posted by: rahulr (117.192.106.---)
Date: August 01, 2009 09:33PM

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"winking smiley;

// 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;"winking smiley;

// execute a query
$result = $db->query("SELECT * FROM foo"winking smiley;
// iterate through the retrieved rows
while ($result->valid()) {
// fetch current row
$row = $result->current();
print_r($row);
// proceed to next row
$result->next();
}

Options: ReplyQuote
Re: SQLiteDatabase Error ...!
Posted by: c2dan (---.15-1.cable.virginmedia.com)
Date: August 02, 2009 11:29AM

What is the fatal error? Have you made sure Sqlite is enabled?

Options: ReplyQuote


Sorry, only registered users may post in this forum.