From: CiaranG Date: Mon, 9 Mar 2009 20:24:56 +0000 (+0000) Subject: PostgreSQL - a couple more GROUP BY queries that needed to be explicit X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=945bbf00dc9ee106359e9387956c72c1290d12fc;p=quix0rs-gnu-social.git PostgreSQL - a couple more GROUP BY queries that needed to be explicit --- diff --git a/actions/favorited.php b/actions/favorited.php index 5082f4a4eb..231b978973 100644 --- a/actions/favorited.php +++ b/actions/favorited.php @@ -178,7 +178,7 @@ class FavoritedAction extends Action $qry = 'SELECT notice.*, '. $weightexpr . ' as weight ' . 'FROM notice JOIN fave ON notice.id = fave.notice_id ' . - 'GROUP BY fave.notice_id ' . + 'GROUP BY id,profile_id,uri,content,rendered,url,created,notice.modified,reply_to,is_local,source ' . 'ORDER BY weight DESC'; $offset = ($this->page - 1) * NOTICES_PER_PAGE; diff --git a/lib/topposterssection.php b/lib/topposterssection.php index 4bd59ac797..1a2ce00140 100644 --- a/lib/topposterssection.php +++ b/lib/topposterssection.php @@ -51,7 +51,7 @@ class TopPostersSection extends ProfileSection $qry = 'SELECT profile.*, count(*) as value ' . 'FROM profile JOIN notice ON profile.id = notice.profile_id ' . (common_config('public', 'localonly') ? 'WHERE is_local = 1 ' : '') . - 'GROUP BY profile.id ' . + 'GROUP BY profile.id,nickname,fullname,profileurl,homepage,bio,location,profile.created,profile.modified,textsearch ' . 'ORDER BY value DESC '; $limit = PROFILES_PER_SECTION;