aboutsummaryrefslogtreecommitdiff
path: root/src/com/juick/server/SubscriptionsQueries.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/juick/server/SubscriptionsQueries.java')
-rw-r--r--src/com/juick/server/SubscriptionsQueries.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/juick/server/SubscriptionsQueries.java b/src/com/juick/server/SubscriptionsQueries.java
index ca382fc7..20540b93 100644
--- a/src/com/juick/server/SubscriptionsQueries.java
+++ b/src/com/juick/server/SubscriptionsQueries.java
@@ -49,9 +49,10 @@ public class SubscriptionsQueries {
PreparedStatement stmt = null;
ResultSet rs = null;
try {
- stmt = sql.prepareStatement("SELECT DISTINCT jid FROM jids WHERE active=1 AND user_id IN (SELECT suser_id FROM subscr_users WHERE user_id=? UNION SELECT suser_id FROM subscr_tags INNER JOIN messages_tags ON (messages_tags.message_id=? AND subscr_tags.tag_id=messages_tags.tag_id))");
+ stmt = sql.prepareStatement("SELECT DISTINCT jid FROM jids WHERE active=1 AND user_id!=? AND user_id IN (SELECT suser_id FROM subscr_users WHERE user_id=? UNION SELECT suser_id FROM subscr_tags INNER JOIN messages_tags ON (messages_tags.message_id=? AND subscr_tags.tag_id=messages_tags.tag_id))");
stmt.setInt(1, uid);
- stmt.setInt(2, mid);
+ stmt.setInt(2, uid);
+ stmt.setInt(3, mid);
rs = stmt.executeQuery();
rs.beforeFirst();
while (rs.next()) {