FIX: SQLite3Query::seek() failed to return a record

This commit is contained in:
Loz Calver 2017-01-12 17:08:05 +00:00
parent 47d47ab2a8
commit 0a646577fe

View File

@ -47,10 +47,10 @@ class SQLite3Query extends Query
{
$this->handle->reset();
$i=0;
while ($i < $row && $row = @$this->handle->fetchArray()) {
while ($i <= $row && $result = @$this->handle->fetchArray(SQLITE3_ASSOC)) {
$i++;
}
return true;
return $result;
}
/**
@ -58,6 +58,7 @@ class SQLite3Query extends Query
*/
public function numRecords()
{
$this->handle->reset();
$c=0;
while ($this->handle->fetchArray()) {
$c++;