From 9b8dbec964ec345f1015eb49a7dedf7803c93164 Mon Sep 17 00:00:00 2001 From: Ugnich Anton Date: Sun, 21 Jul 2013 23:34:23 +0700 Subject: Subscribe to @juick when creating a new user --- src/com/juick/server/UserQueries.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/com/juick/server') diff --git a/src/com/juick/server/UserQueries.java b/src/com/juick/server/UserQueries.java index f1b235af..c170b6cd 100644 --- a/src/com/juick/server/UserQueries.java +++ b/src/com/juick/server/UserQueries.java @@ -65,6 +65,17 @@ public class UserQueries { 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); + } + return uid; } -- cgit v1.2.3