SQL:
SELECT *, MATCH(NAZOV, POPIS, CENA) AGAINST ('+htc +one') as Score
FROM `produkty`
WHERE MATCH (NAZOV, POPIS, CENA) AGAINST ('+htc +one')
ORDER BY `TOP` DESC LIMIT 0, 9
.htaccess重写搜索网址:
/vyhladavanie/+htc+one+/
如果我搜索1个单词(例如HTC)就行了!
如果我搜索1个以上的单词(例如HTC One)不能正常工作!为什么呢?
答案 0 :(得分:1)
SELECT * FROM `produkty` WHERE MATCH (NAZOV, POPIS, CENA) AGAINST('+htc +one' IN BOOLEAN MODE) ORDER BY `TOP` DESC LIMIT 0, 9
试试这个