diff options
Diffstat (limited to 'src/com/juick/server/UserQueries.java')
-rw-r--r-- | src/com/juick/server/UserQueries.java | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/src/com/juick/server/UserQueries.java b/src/com/juick/server/UserQueries.java index e56accdb..f127cbca 100644 --- a/src/com/juick/server/UserQueries.java +++ b/src/com/juick/server/UserQueries.java @@ -54,27 +54,8 @@ public class UserQueries { Utils.finishSQL(rs, stmt); } - PreparedStatement stmt2 = null; - try { - stmt2 = sql.prepareStatement("INSERT INTO useroptions(user_id) VALUES (?)"); - stmt2.setInt(1, uid); - stmt2.executeUpdate(); - } catch (SQLException e) { - System.err.println(e); - } finally { - Utils.finishSQL(null, stmt); - } - - PreparedStatement stmt3 = null; - try { - stmt3 = sql.prepareStatement("INSERT INTO subscr_users(user_id,suser_id) VALUES (2,?)"); - stmt3.setInt(1, uid); - stmt3.executeUpdate(); - } catch (SQLException e) { - System.err.println(e); - } finally { - Utils.finishSQL(null, stmt); - } + SQLHelpers.executeInt(sql, "INSERT INTO useroptions(user_id) VALUES (?)", uid); + SQLHelpers.executeInt(sql, "INSERT INTO subscr_users(user_id,suser_id) VALUES (2,?)", uid); return uid; } |