From 1490a0177059918f831217f56b3e7627a63fc963 Mon Sep 17 00:00:00 2001 From: Sanny Sanoff Date: Fri, 15 Jul 2016 21:56:35 +0300 Subject: fixed order of binds --- juick-core/src/main/java/com/juick/server/MessagesQueries.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'juick-core/src') 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..7eab66f0 100644 --- a/juick-core/src/main/java/com/juick/server/MessagesQueries.java +++ b/juick-core/src/main/java/com/juick/server/MessagesQueries.java @@ -173,8 +173,8 @@ public class MessagesQueries { } } try (PreparedStatement ps = conn.prepareStatement("UPDATE messages SET maxreplyid=? WHERE message_id=?")) { - ps.setInt(1, mid); - ps.setInt(2, replyNo); + ps.setInt(1, replyNo); + ps.setInt(2, mid); if (ps.executeUpdate() != 1) { throw new IncorrectResultSizeDataAccessException("Cannot find a message to update: " + mid, 1, 0); } -- cgit v1.2.3