aboutsummaryrefslogtreecommitdiff
path: root/juick-core/src/main/java/com/juick
diff options
context:
space:
mode:
Diffstat (limited to 'juick-core/src/main/java/com/juick')
-rw-r--r--juick-core/src/main/java/com/juick/server/UserQueries.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/juick-core/src/main/java/com/juick/server/UserQueries.java b/juick-core/src/main/java/com/juick/server/UserQueries.java
index 97d40968..b79f179c 100644
--- a/juick-core/src/main/java/com/juick/server/UserQueries.java
+++ b/juick-core/src/main/java/com/juick/server/UserQueries.java
@@ -126,7 +126,7 @@ public class UserQueries {
public static List<User> getUsersByName(JdbcTemplate sql, List<String> unames) {
if (!unames.isEmpty()) {
- return sql.query("SELECT id,nick,banned FROM users WHERE nick IN (" + StringUtils.arrayToCommaDelimitedString(unames.toArray()) + ")",
+ return sql.query("SELECT id,nick,banned FROM users WHERE nick IN (\"" + StringUtils.arrayToDelimitedString(unames.toArray(), "\",\"") + "\")",
new UserMapper());
}
return Collections.emptyList();
@@ -144,7 +144,7 @@ public class UserQueries {
if (!jids.isEmpty()) {
return sql.query("SELECT users.id,users.nick,jids.jid FROM users "
+ "INNER JOIN jids ON jids.user_id=users.id "
- + "WHERE jids.jid IN (" + StringUtils.arrayToCommaDelimitedString(jids.toArray()) + ")",
+ + "WHERE jids.jid IN (\"" + StringUtils.arrayToDelimitedString(jids.toArray(), "\",\"") + "\")",
(rs, rowNum) -> {
com.juick.User user = new com.juick.User();
user.setUID(rs.getInt(1));