954,576 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

SQLiteDatabase Error ...!

i was just trying the new DBMS , herd it was kinda faster than MySql in some case.
the below is the code i have taken (Standard example) and still i am getting error.

<?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();
}

// not generally needed as PHP will destroy the connection
unset($db);

?>


The error is something like thisFatal error: Class 'SQLiteDatabase' not found in C:\wamp\www\db\db2.php on line 4

i have no idea on how to make this stuff work , i would be glad if u guys could help me out.

rahul8590
Posting Whiz
351 posts since Mar 2009
Reputation Points: 92
Solved Threads: 20
 

Is sqllite enabled in your php.ini ?

pritaeas
Posting Expert
Moderator
5,480 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
 

well i have installed Wamp server , and everything came as a whole package.
do i have to configure it before using it...?

rahul8590
Posting Whiz
351 posts since Mar 2009
Reputation Points: 92
Solved Threads: 20
 

No, should work after installing Wamp. Did you check Wamp's forum ?

pritaeas
Posting Expert
Moderator
5,480 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
 

no i havent checked the wamp forum. But i got that error as the one shown above. , honestly have no idea wats happening...

rahul8590
Posting Whiz
351 posts since Mar 2009
Reputation Points: 92
Solved Threads: 20
 

I Sorry my english is very bad:
Un Poco tarde a mi tambien me ha pasado
solo se tiene que marcar el el servidor de wamp
php -> php Extencions -> sql_elite
php -> php Extencions -> sql_elite3
supongo que toca un fichero ini , perĂ² si lo hacen por ti :)

jmoli
Newbie Poster
1 post since Apr 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You