]> git.mxchange.org Git - friendica.git/commitdiff
Improved query
authorMichael <heluecht@pirati.ca>
Mon, 17 May 2021 22:44:42 +0000 (22:44 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 17 May 2021 22:44:42 +0000 (22:44 +0000)
src/Module/Api/Mastodon/Search.php

index 463c0eb6d04a8f0279a3510d14461170c42ac62a..b964b35db85b58bd4d155cb4ced2d69c67f7e5ee 100644 (file)
@@ -181,7 +181,7 @@ class Search extends BaseApi
 
                $params = ['order' => ['name'], 'limit' => [$offset, $limit]];
 
-               $condition = ["`id` IN (SELECT `tid` FROM `post-tag` WHERE `type` = ? AND `tid` = `id`) AND `name` LIKE ?", Tag::HASHTAG, $q . '%'];
+               $condition = ["EXISTS(SELECT `tid` FROM `post-tag` WHERE `type` = ? AND `tid` = `id`) AND `name` LIKE ?", Tag::HASHTAG, $q . '%'];
 
                $tags = DBA::select('tag', ['name'], $condition, $params);