gpt4 book ai didi

php - 互斥 MySQL 全文搜索

转载 作者:行者123 更新时间:2023-11-30 23:34:58 27 4
gpt4 key购买 nike

假设我有一个包含以下列的 MySQL 表:

   |variables|1. | 'a'     |2. | 'a b'   |3. | 'a b c' |4. |   ...   |

How can I construct a MySQL Full-Text search that doesn't ignore white space in the column entries?

For example, I would like the following query to return only row 1:

SELECT column FROM table WHERE MATCH variables AGAINST ('a')

但是,实际上,此查询将返回第 1-3 行,因为所有三行都包含字母“a”。

最佳答案

您的搜索规则不清楚,但这可能是 regular expression search将比全文查询更好地为您服务。

关于php - 互斥 MySQL 全文搜索,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8234342/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com