This commit is contained in:
Laurent Destailleur 2021-05-27 02:52:51 +02:00
parent 4f61286ae2
commit 2caaa52e85

View File

@ -520,6 +520,7 @@ $sql .= $db->order($sortfield, $sortorder);
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
// TODO Set and use an optimized request in $sqlforcount with no fields and no useless join to caluclate nb of records
$result = $db->query($sql);
$nbtotalofrecords = $db->num_rows($result);
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0