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

查看:40
本文介绍了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天全站免登陆