Home > Database > Mysql Tutorial > body text

mysql-MYSQL 查询语句中含有逗号的问题。。

WBOY
Release: 2016-06-06 09:39:15
Original
2462 people have browsed it

mysql数据库索引搜索

数据库做了全文索引内容格式大概如下
1234,4321,5555,6666
12345,54321,55555,66666
123456,654321,555555,666666
用语句搜索

UNION SELECT * FROM sed_data13 WHERE MATCH (content) AGAINST ('1234')
返回的结果是
1234,4321,5555,6666
12345,54321,55555,66666
123456,654321,555555,666666
三条都有,因为都包含有1234。
现在如果想搜索 1234, 在尾部加个逗号,不知道在语句中怎么表达?因为在这个语句中,逗号就相当于多个条件了。谢谢大牛们帮忙!

搜索语句

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template