REGEXP_REPLACE

Use REGEXP_REPLACE to capture all leading punctuation, not just ' and "
This commit is contained in:
Brian Huisman 2023-04-20 22:35:32 -04:00
parent 47e0173a1d
commit daaf934e33

View file

@ -1569,7 +1569,7 @@ document.write(mustache.render(
FROM `'.$_DDATA['tbprefix'].'query` AS `t`
INNER JOIN (
SELECT `query`, COUNT(`query`) AS `hits`,
TRIM(\'\\\'\' FROM TRIM(\'"\' FROM `query`)) AS `alpha`,
REGEXP_REPLACE(`query`, \'^[[:punct:]]+\', \'\') AS `alpha`,
MAX(`stamp`) AS `last_hit`, AVG(`results`) AS `avg_results`
FROM `'.$_DDATA['tbprefix'].'query`
GROUP BY `query`