summaryrefslogtreecommitdiff
path: root/lib/VNDB/DB
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2015-10-25 15:17:22 +0100
committerYorhel <git@yorhel.nl>2015-10-25 15:17:22 +0100
commita29a46c37e95c63d525bd2468a7104b54b179394 (patch)
treed0d2b316f045e4b2882051a7d5686b2222508630 /lib/VNDB/DB
parente3b9348aaff9cfc059638b1a9cb6f7ec41e2c1f6 (diff)
DB::Discussions: Fix bug in 'notusers' query
'<> ANY' doesn't work that way. NOT EXISTS() is also pretty fast and does what we want.
Diffstat (limited to 'lib/VNDB/DB')
-rw-r--r--lib/VNDB/DB/Discussions.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNDB/DB/Discussions.pm b/lib/VNDB/DB/Discussions.pm
index bacc728e..48859611 100644
--- a/lib/VNDB/DB/Discussions.pm
+++ b/lib/VNDB/DB/Discussions.pm
@@ -27,7 +27,7 @@ sub dbThreadGet {
$o{type} && $o{iid} ? (
'tb.type = ?' => $o{type}, 'tb.iid = ?' => $o{iid} ) : (),
$o{notusers} ? (
- 't.id <> ANY(ARRAY(SELECT tid FROM threads_boards WHERE type = \'u\'))' => 1) : (),
+ 'NOT EXISTS(SELECT 1 FROM threads_boards WHERE type = \'u\' AND tid = t.id)' => 1) : (),
);
if($o{search}) {