From 86ff2faabe05ef8b856166455d2f9977afd778a1 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 15 Jul 2016 22:25:17 +0300 Subject: fix replies query --- juick-core/src/main/java/com/juick/server/MessagesQueries.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'juick-core') diff --git a/juick-core/src/main/java/com/juick/server/MessagesQueries.java b/juick-core/src/main/java/com/juick/server/MessagesQueries.java index 5659e79c..dfc3efbc 100644 --- a/juick-core/src/main/java/com/juick/server/MessagesQueries.java +++ b/juick-core/src/main/java/com/juick/server/MessagesQueries.java @@ -595,7 +595,7 @@ public class MessagesQueries { } public static List getReplies(JdbcTemplate sql, int mid) { - return sql.query("SELECT 0 as mid, replies.reply_id,replies.replyto, " + + return sql.query("SELECT ? as mid, replies.reply_id,replies.replyto, " + "replies.user_id,users.nick,users.banned, " + "TIMESTAMPDIFF(MINUTE,replies.ts,NOW()),replies.ts," + "0 as readonly, 0 as privacy, 0 as replies," + @@ -604,7 +604,7 @@ public class MessagesQueries { "NULL as tags,NULL as repliesby, replies.txt " + "FROM replies INNER JOIN users " + "ON replies.user_id=users.id WHERE replies.message_id=? ORDER BY replies.reply_id ASC", - new MessageMapper(), mid); + new MessageMapper(), mid, mid); } public static boolean setMessagePopular(JdbcTemplate sql, int mid, int popular) { -- cgit v1.2.3