I created a Sqlite3 database with PHP:
$db = new SQLite3('mysqlitedb.db'); $db->exec('CREATE TABLE foo (bar STRING)'); $db->exec("INSERT INTO foo (bar) VALUES ('This is a test')"); $db->exec("INSERT INTO foo (bar) VALUES ('This is another test')");
but when I try to get all the lines:
$result = $db->query('SELECT * FROM foo'); var_dump($result->fetchArray());
it returns only the first line in db:
array(2) { [0]=> string(14) "This is a test" ["bar"]=> string(14) "This is a test" }
I am not sure why it does not return all rows.
source share