mirror of
https://github.com/silverstripe/silverstripe-sqlite3
synced 2024-10-22 17:05:37 +02:00
FIX: SQLite3Query::seek() failed to return a record
This commit is contained in:
parent
47d47ab2a8
commit
0a646577fe
@ -47,10 +47,10 @@ class SQLite3Query extends Query
|
|||||||
{
|
{
|
||||||
$this->handle->reset();
|
$this->handle->reset();
|
||||||
$i=0;
|
$i=0;
|
||||||
while ($i < $row && $row = @$this->handle->fetchArray()) {
|
while ($i <= $row && $result = @$this->handle->fetchArray(SQLITE3_ASSOC)) {
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
return true;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -58,6 +58,7 @@ class SQLite3Query extends Query
|
|||||||
*/
|
*/
|
||||||
public function numRecords()
|
public function numRecords()
|
||||||
{
|
{
|
||||||
|
$this->handle->reset();
|
||||||
$c=0;
|
$c=0;
|
||||||
while ($this->handle->fetchArray()) {
|
while ($this->handle->fetchArray()) {
|
||||||
$c++;
|
$c++;
|
||||||
|
Loading…
Reference in New Issue
Block a user