Answer the question
In order to leave comments, you need to log in
How to get more than one record in SQLite?
Hello. To be honest, I don't quite understand why it behaves differently than the conditional mysql pdo. Why when I do:
$db = new SQLite3('mysqlitedb.db');
p($db->query('SELECT * FROM test')->fetchArray(SQLITE3_ASSOC));
function resultSetToArray($queryResultSet){
$multiArray = array();
$count = 0;
while($row = $queryResultSet->fetchArray(SQLITE3_ASSOC)){
foreach($row as $i=>$value) {
$multiArray[$count][$i] = $value;
}
$count++;
}
return $multiArray;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question