aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Sanny Sanoff2016-07-15 21:56:35 +0300
committerGravatar Sanny Sanoff2016-07-15 21:56:35 +0300
commit1490a0177059918f831217f56b3e7627a63fc963 (patch)
treecdf4c6d1a9feefc59c082d20e74073bd07da2656
parentc8103ad9478f928e366b784ef95e4d92068ab4ed (diff)
fixed order of binds
-rw-r--r--juick-core/src/main/java/com/juick/server/MessagesQueries.java4
1 files changed, 2 insertions, 2 deletions
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);
}