filter_to_sql: properly set query limit by date
This commit is contained in:
parent
d206ae1d6a
commit
6b8b3af87e
|
@ -7348,13 +7348,14 @@
|
||||||
|
|
||||||
if ($query) {
|
if ($query) {
|
||||||
if (DB_TYPE == "pgsql") {
|
if (DB_TYPE == "pgsql") {
|
||||||
$query .= " AND ttrss_entries.date_entered > NOW() - INTERVAL '30 days'";
|
$query = " ($query) AND ttrss_entries.date_entered > NOW() - INTERVAL '14 days'";
|
||||||
} else {
|
} else {
|
||||||
$query .= " AND ttrss_entries.date_entered > DATE_SUB(NOW(), INTERVAL 30 DAY";
|
$query = " ($query) AND ttrss_entries.date_entered > DATE_SUB(NOW(), INTERVAL 14 DAY";
|
||||||
}
|
}
|
||||||
$query .= " AND ";
|
$query .= " AND ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return $query;
|
return $query;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue