[autocomplete] don't show tags with 0 uses, see #1012

This commit is contained in:
Shish 2024-01-14 16:45:09 +00:00
parent 2af4a83fd1
commit 1b6d8540a5

View file

@ -64,8 +64,10 @@ class AutoComplete extends Extension
" "
SELECT tag, count SELECT tag, count
FROM tags FROM tags
WHERE LOWER(tag) LIKE LOWER(:search) WHERE (
OR LOWER(tag) LIKE LOWER(:cat_search) LOWER(tag) LIKE LOWER(:search)
OR LOWER(tag) LIKE LOWER(:cat_search)
)
AND count > 0 AND count > 0
ORDER BY count DESC, tag ASC ORDER BY count DESC, tag ASC
$limitSQL $limitSQL