From 4715cbed779182ae8e234acb46508f24a5a5f5d6 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 7 Jul 2016 12:29:20 +0300 Subject: fix recommendations query --- src/main/java/com/juick/server/SubscriptionsQueries.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/com/juick/server') diff --git a/src/main/java/com/juick/server/SubscriptionsQueries.java b/src/main/java/com/juick/server/SubscriptionsQueries.java index 0cf3f169..7c30285b 100644 --- a/src/main/java/com/juick/server/SubscriptionsQueries.java +++ b/src/main/java/com/juick/server/SubscriptionsQueries.java @@ -62,7 +62,7 @@ public class SubscriptionsQueries { public static List getUsersSubscribedToUserRecommendations(JdbcTemplate sql, int uid, int mid, int muid) { List tags = MessagesQueries.getMessageTagsIDs(sql, mid); - String query = "SELECT user_id IN (SELECT suser_id FROM subscr_users WHERE user_id=" + uid + ")"; + String query = "SELECT suser_id FROM subscr_users WHERE user_id=" + uid; query += " AND user_id NOT IN (SELECT user_id FROM bl_users WHERE bl_user_id=" + muid + ")"; query += " AND user_id NOT IN (SELECT suser_id FROM subscr_users WHERE user_id=" + muid + ")"; query += " AND user_id NOT IN (SELECT suser_id FROM subscr_messages WHERE message_id=" + mid + ")"; -- cgit v1.2.3