git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit 945bbf00 authored by CiaranG's avatar CiaranG

PostgreSQL - a couple more GROUP BY queries that needed to be explicit

parent 8d3d16f2
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment