diff options
author | Yorhel <git@yorhel.nl> | 2015-10-25 15:17:22 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2015-10-25 15:17:22 +0100 |
commit | a29a46c37e95c63d525bd2468a7104b54b179394 (patch) | |
tree | d0d2b316f045e4b2882051a7d5686b2222508630 /lib/VNDB/DB | |
parent | e3b9348aaff9cfc059638b1a9cb6f7ec41e2c1f6 (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.pm | 2 |
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}) { |