i am using this PHP code for getting rows but it's getting error
$db = new PDO('sqlite:db/logs');
$result = $db->exec("SELECT * FROM users");
while($row = $result->fetch(SQLITE_ASSOC))
{
}
I am using sqlite3 and php5 and i want to know that
am i connecting with right code to the database i've also used
sqlite.open()
but it's also getting error?This
new PDO('sqlite:db/logs')
connect with database but why new is it create new db everytimemy main problem is i am getting error where while loop is that
Call to a member function fetch() on a non-object
please help me out this i am newbie in php and sqlite