summaryrefslogtreecommitdiffstats
path: root/store/sql_post_store.go
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-07-12 19:12:23 -0800
committer=Corey Hulen <corey@hulen.com>2015-07-12 19:12:23 -0800
commit443a386f775dba732fa788625dc99438d16d3931 (patch)
tree7b879e2e31fc46d9feb2262a775fd09003b4bffc /store/sql_post_store.go
parentcf11d387eef7883d8c2866d8bb44887120499963 (diff)
downloadchat-443a386f775dba732fa788625dc99438d16d3931.tar.gz
chat-443a386f775dba732fa788625dc99438d16d3931.tar.bz2
chat-443a386f775dba732fa788625dc99438d16d3931.zip
minor tweaks to make sure mysql still runs
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 3aab1a05d..f557fb05c 100644
--- a/store/sql_post_store.go
+++ b/store/sql_post_store.go
@@ -295,7 +295,7 @@ func (s SqlPostStore) getRootPosts(channelId string, offset int, limit int) Stor
result := StoreResult{}
var posts []*model.Post
- _, err := s.GetReplica().Select(&posts, "SELECT * FROM Posts WHERE ChannelId = :ChannelId AND DeleteAt = 0 ORDER BY CreateAt DESC OFFSET :Offset LIMIT :Limit", map[string]interface{}{"ChannelId": channelId, "Offset": offset, "Limit": limit})
+ _, err := s.GetReplica().Select(&posts, "SELECT * FROM Posts WHERE ChannelId = :ChannelId AND DeleteAt = 0 ORDER BY CreateAt DESC LIMIT :Limit OFFSET :Offset", map[string]interface{}{"ChannelId": channelId, "Offset": offset, "Limit": limit})
if err != nil {
result.Err = model.NewAppError("SqlPostStore.GetLinearPosts", "We couldn't get the posts for the channel", "channelId="+channelId+err.Error())
} else {
@@ -333,7 +333,7 @@ func (s SqlPostStore) getParentsPosts(channelId string, offset int, limit int) S
ChannelId = :ChannelId1
AND DeleteAt = 0
ORDER BY CreateAt DESC
- OFFSET :Offset LIMIT :Limit) q3) q1 ON q1.RootId = q2.RootId
+ LIMIT :Limit OFFSET :Offset) q3) q1 ON q1.RootId = q2.RootId
WHERE
ChannelId = :ChannelId2
AND DeleteAt = 0