我想用 [space] (Ascii 32) 作为其中的一部分在 mysql DB 中搜索文本。但我没有得到正确的结果。
我的 MySql 查询是:
SELECT count(id) as total
, MIN(product_price) as min_price
, MAX(product_price) as max_price
FROM `products_details`
WHERE subcat_id = 1026
AND MATCH(alternate_name, product_desc, keywords)
AGAINST ('+moto +g +plus +(>mobile <mobiles)'; IN BOOLEAN MODE)
Run Code Online (Sandbox Code Playgroud)
我有以下问题:
AGAINST ('+moto +g +plus +(>mobile <mobiles)'
我想moto g plus使用上面的查询搜索字符串移动。我想在g. 例如,moto "SPACE"g"SPACE"。
我尝试了以下 2 个解决方案,但它不起作用。
[[:空间:]]
AGAINST ('+moto +[[:space:]]g[[:space:]] +plus +(>mobile <mobiles)'
和
AGAINST ('+moto +\\ g\\ +plus +(>mobile <mobiles)'==> 我在此查询中的 …