take out category-autocomplete pending performance tweaks

This commit is contained in:
Shish 2019-07-06 11:27:05 +01:00
parent c682670f64
commit 2935db9d6d

View File

@ -40,7 +40,7 @@ class AutoComplete extends Extension
$limitSQL = ""; $limitSQL = "";
$s = str_replace('_','\_', $s); $s = str_replace('_','\_', $s);
$s = str_replace('%','\%', $s); $s = str_replace('%','\%', $s);
$SQLarr = ["search"=>"$s%", "cat_search"=>"%:$s%"]; $SQLarr = ["search"=>"$s%"]; #, "cat_search"=>"%:$s%"];
if (isset($_GET["limit"]) && $_GET["limit"] !== 0) { if (isset($_GET["limit"]) && $_GET["limit"] !== 0) {
$limitSQL = "LIMIT :limit"; $limitSQL = "LIMIT :limit";
$SQLarr['limit'] = $_GET["limit"]; $SQLarr['limit'] = $_GET["limit"];
@ -54,7 +54,7 @@ class AutoComplete extends Extension
SELECT tag, count SELECT tag, count
FROM tags FROM tags
WHERE SCORE_STRNORM(tag) LIKE SCORE_STRNORM(:search) WHERE SCORE_STRNORM(tag) LIKE SCORE_STRNORM(:search)
OR SCORE_STRNORM(tag) LIKE SCORE_STRNORM(:cat_search) -- OR SCORE_STRNORM(tag) LIKE SCORE_STRNORM(:cat_search)
AND count > 0 AND count > 0
ORDER BY count DESC ORDER BY count DESC
$limitSQL"), $limitSQL"),