mysql 匹配 ~ 示例 [英] mysql match against ~ example

查看:23
本文介绍了mysql 匹配 ~ 示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面是我坚持使用的一个示例 sql,它不会返回名为mill hotel"的酒店它返回其他 10 个酒店.任何帮助都会非常感谢

Below is an example sql I am stuck with, it will not return a hotel named "mill hotel" It returns 10 other hotels. Any help would be great thanks

SELECT * FROM tbl WHERE match(hotel) against('the mill hotel' IN BOOLEAN MODE) LIMIT 10";

<小时>

推荐答案

您需要指定运算符,因为在 OR 运算中没有指定任何结果.试试这个:

You need to specify the operators, because not specifying any results in an OR operation. Try this:

SELECT * FROM tbl WHERE match(hotel) against('+the mill hotel' IN BOOLEAN MODE) LIMIT 10";

阅读更多

这篇关于mysql 匹配 ~ 示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆