Skip to content
Snippets Groups Projects
Commit 193f4312 authored by Jason Salyers's avatar Jason Salyers
Browse files

[JES] Fix a broken query

parent a76b951e
No related branches found
No related tags found
2 merge requests!456Release candidate v1 24,!370Jsalyers muting at sql level
...@@ -45,7 +45,8 @@ BEGIN ...@@ -45,7 +45,8 @@ BEGIN
hp.community_title, hp.community_title,
hp.role_id, hp.role_id,
hp.is_pinned, hp.is_pinned,
hp.curator_payout_value hp.curator_payout_value,
hp.is_muted
FROM FROM
hive_posts_view hp hive_posts_view hp
JOIN hive_subscriptions hs ON hp.community_id = hs.community_id JOIN hive_subscriptions hs ON hp.community_id = hs.community_id
...@@ -394,7 +395,6 @@ BEGIN ...@@ -394,7 +395,6 @@ BEGIN
WHERE WHERE
hs.account_id = __account_id AND hp1.counter_deleted = 0 AND NOT hp1.is_paidout AND hp1.depth = 0 hs.account_id = __account_id AND hp1.counter_deleted = 0 AND NOT hp1.is_paidout AND hp1.depth = 0
AND ( __post_id = 0 OR hp1.sc_trend < __trending_limit OR ( hp1.sc_trend = __trending_limit AND hp1.id < __post_id ) ) AND ( __post_id = 0 OR hp1.sc_trend < __trending_limit OR ( hp1.sc_trend = __trending_limit AND hp1.id < __post_id ) )
AND hp.author NOT IN (SELECT muted FROM muted_accounts_view WHERE observer = _observer)
ORDER BY hp1.sc_trend DESC, hp1.id DESC ORDER BY hp1.sc_trend DESC, hp1.id DESC
LIMIT _limit LIMIT _limit
) trending ) trending
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment