Limit overboard db query by age

This commit is contained in:
Retro_Guy 2020-12-16 23:26:09 -07:00
parent 45775395e1
commit abd6be4db2
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ ob_start();
$database = $spooldir.'/'.$config_name.'-overview.db3';
$table = 'overview';
$dbh = rslight_db_open($database, $table);
$query = $dbh->prepare('SELECT * FROM '.$table.' WHERE newsgroup=:findgroup ORDER BY date DESC LIMIT '.$maxdisplay);
$query = $dbh->prepare('SELECT * FROM '.$table.' WHERE newsgroup=:findgroup AND date >= '.$oldest.' ORDER BY date DESC LIMIT '.$maxdisplay);
$articles = array();
foreach($grouplist as $findgroup) {
$groups = preg_split("/(\ |\t)/", $findgroup, 2);