mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-11 10:54:27 +02:00
(Hopefully) SQL improvements
This commit is contained in:
parent
be9bbe1709
commit
3911c9450b
11 changed files with 34 additions and 35 deletions
|
@ -180,7 +180,7 @@ class Search extends BaseApi
|
|||
|
||||
$params = ['order' => ['name'], 'limit' => [$offset, $limit]];
|
||||
|
||||
$condition = ["EXISTS(SELECT `tid` FROM `post-tag` WHERE `type` = ? AND `tid` = `id`) AND `name` LIKE ?", Tag::HASHTAG, $q . '%'];
|
||||
$condition = ["`id` IN (SELECT `tid` FROM `post-tag` WHERE `type` = ?) AND `name` LIKE ?", Tag::HASHTAG, $q . '%'];
|
||||
|
||||
$tags = DBA::select('tag', ['name'], $condition, $params);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue