本文介紹了mysql 匹配 ~ 示例的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!
問(wèn)題描述
下面是我堅(jiān)持使用的一個(gè)示例 sql,它不會(huì)返回名為mill hotel"的酒店它返回其他 10 個(gè)酒店.任何幫助都會(huì)非常感謝
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";
<小時(shí)>
推薦答案
您需要指定運(yùn)算符,因?yàn)樵?OR 運(yùn)算中沒(méi)有指定任何結(jié)果.試試這個(gè):
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";
閱讀更多
這篇關(guān)于mysql 匹配 ~ 示例的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!