Alexandre Alapetite 10 years ago
parent 5d7deb6d25
commit 3403af3050
  1. 2
      app/Models/EntryDAO.php

@ -353,7 +353,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo {
throw new FreshRSS_EntriesGetter_Exception('Bad order in Entry->listByType: [' . $order . ']!');
}
if ($firstId === '' && parent::$sharedDbType === 'mysql') {
$firstId = '9000000000' . '000000'; //MySQL optimization. Tested on MySQL 5.5 with 150k articles
$firstId = $order === 'DESC' ? '9000000000'. '000000' : '0'; //MySQL optimization. Tested on MySQL 5.5 with 150k articles
}
if ($firstId !== '') {
$where .= 'AND e1.id ' . ($order === 'DESC' ? '<=' : '>=') . $firstId . ' ';

Loading…
Cancel
Save