From 2ac6b765ab62750fc8348d5bca1efbff9c42a71d Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 28 Apr 2008 11:08:44 +0100 Subject: [PATCH] more work on PGSQL 8.3 compatibility (refs #201) --- functions.php | 4 ++-- modules/pref-feed-browser.php | 4 ++-- modules/pref-feeds.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/functions.php b/functions.php index 5044976f..3390eca8 100644 --- a/functions.php +++ b/functions.php @@ -1108,8 +1108,8 @@ $result = db_query($link, "SELECT id,content_hash,no_orig_date,title, - substring(date_entered,1,19) as date_entered, - substring(updated,1,19) as updated, + ".SUBSTRING_FOR_DATE."(date_entered,1,19) as date_entered, + ".SUBSTRING_FOR_DATE."(updated,1,19) as updated, num_comments FROM ttrss_entries diff --git a/modules/pref-feed-browser.php b/modules/pref-feed-browser.php index bdbb930d..a80109bc 100644 --- a/modules/pref-feed-browser.php +++ b/modules/pref-feed-browser.php @@ -44,8 +44,8 @@ $result = db_query($link, "SELECT ttrss_entries.title, content,link, - substring(date_entered,1,19) as date_entered, - substring(updated,1,19) as updated + ".SUBSTRING_FOR_DATE."(date_entered,1,19) as date_entered, + ".SUBSTRING_FOR_DATE."(updated,1,19) as updated FROM ttrss_entries,ttrss_user_entries WHERE ttrss_entries.id = ref_id AND feed_id = '$id' ORDER BY updated DESC LIMIT 5"); diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index 43be1cbe..6bd6b4ab 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -821,7 +821,7 @@ F1.id, F1.title, F1.feed_url, - substring(F1.last_updated,1,16) AS last_updated, + ".SUBSTRING_FOR_DATE."(F1.last_updated,1,16) AS last_updated, F1.parent_feed, F1.update_interval, F1.last_error, -- 2.39.5