* revert change to get number total results
   this partially reverts bf42973c
This commit is contained in:
Sarjuuk 2018-04-07 20:36:09 +02:00
parent 74308da407
commit 2518e4730b

View file

@ -262,19 +262,7 @@ abstract class BaseType
foreach ($this->dbNames as $dbIdx => $n)
{
$query = str_replace('DB_IDX', $dbIdx, $this->queryBase);
if (key($this->dbNames) === 0)
{
if ($rows = DB::{$n}($dbIdx)->select($query))
{
$mtchQry = preg_replace('/SELECT .*? FROM/', 'SELECT count(1) FROM', $this->queryBase);
$mtch = DB::{$n}($dbIdx)->selectCell($mtchQry);
}
}
else
$rows = DB::{$n}($dbIdx)->SelectPage($mtch, $query);
if ($rows)
if ($rows = DB::{$n}($dbIdx)->SelectPage($mtch, $query))
{
$this->matches += $mtch;
foreach ($rows as $id => $row)