aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-07-07 12:29:20 +0300
committerGravatar Vitaly Takmazov2016-07-07 12:29:20 +0300
commit4715cbed779182ae8e234acb46508f24a5a5f5d6 (patch)
tree244372717cc2abdddbdb652c23d5d3de8fccefa4 /src
parente0334bd9adc4fe06cf6e7bad6fde87fc70a3ea19 (diff)
fix recommendations query
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/juick/server/SubscriptionsQueries.java2
1 files changed, 1 insertions, 1 deletions
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<User> getUsersSubscribedToUserRecommendations(JdbcTemplate sql, int uid, int mid, int muid) {
List<Integer> 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 + ")";