summaryrefslogtreecommitdiffstats
path: root/store/sql_post_store.go
diff options
context:
space:
mode:
authorJason Rossman <Jason_Rossman@playstation.sony.com>2015-08-27 12:45:47 -0600
committerJason Rossman <Jason_Rossman@playstation.sony.com>2015-08-27 12:45:47 -0600
commit879fa084c9bea87f655dc3025928a251a845980a (patch)
treebedf1c2bf6d21c2efcbc1f023ba892866f32eae5 /store/sql_post_store.go
parent4aafff7f83359531cb2e110f4b7c080e33407cc3 (diff)
downloadchat-879fa084c9bea87f655dc3025928a251a845980a.tar.gz
chat-879fa084c9bea87f655dc3025928a251a845980a.tar.bz2
chat-879fa084c9bea87f655dc3025928a251a845980a.zip
fix GetParentPosts() query
Diffstat (limited to 'store/sql_post_store.go')
-rw-r--r--store/sql_post_store.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/store/sql_post_store.go b/store/sql_post_store.go
index 81405c620..78361270e 100644
--- a/store/sql_post_store.go
+++ b/store/sql_post_store.go
@@ -343,9 +343,9 @@ func (s SqlPostStore) getParentsPosts(channelId string, offset int, limit int) S
WHERE
ChannelId = :ChannelId1
AND DeleteAt = 0
- AND RootId <> ''
ORDER BY CreateAt DESC
- LIMIT :Limit OFFSET :Offset) q3) q1 ON q1.RootId = q2.RootId
+ LIMIT :Limit OFFSET :Offset) q3
+ WHERE q3.RootId != '') q1 ON q1.RootId = q2.Id
WHERE
ChannelId = :ChannelId2
AND DeleteAt = 0