Merge pull request #30 from kinglozzer/fix-seek

FIX: SQLite3Query::seek() failed to return a record
This commit is contained in:
Daniel Hensby 2017-01-13 11:56:18 +00:00 committed by GitHub
commit 4e854b3fd2

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++;