feed browser: prefer updated feeds when possible

This commit is contained in:
Andrew Dolgov 2008-02-05 08:42:00 +01:00
parent 2b6ed06b23
commit 3f7e6cd005
1 changed files with 6 additions and 2 deletions

View File

@ -121,9 +121,13 @@
while ($line = db_fetch_assoc($result)) {
$feed_url = $line["feed_url"];
$subscribers = $line["subscribers"];
// mysql returns NULL records first by default
if (DB_TYPE == "mysql") $order_fix = "DESC";
$det_result = db_query($link, "SELECT site_url,title,id
FROM ttrss_feeds WHERE feed_url = '$feed_url' LIMIT 1");
FROM ttrss_feeds WHERE feed_url = '$feed_url'
ORDER BY last_updated $order_fix LIMIT 1");
$details = db_fetch_assoc($det_result);