《PHP實戰:php mysql like 實現多關鍵詞搜索的方法》要點:
本文介紹了PHP實戰:php mysql like 實現多關鍵詞搜索的方法,希望對您有用。如果有疑問,可以聯系我們。
PHP學習或者叫,分詞檢索數據庫
PHP學習$res = mysql_query("select * from peter where id like '%中草藥%' and '%6%'"); //這樣寫是報錯的;
PHP學習$res = mysql_query("select * from peter where id like '%中草藥%' or '%6%'"); //而這樣寫是正確的;奇怪~
PHP學習?
PHP學習$res = mysql_query("select * from peter where id like '%中草藥%' and id like '%6%'"); //這樣寫是正確的;
PHP學習$res = mysql_query("select * from peter where id like '%中草藥%' or id like '%6%'"); //這樣寫都是正確的;
PHP學習以上就是小編為大家帶來的php mysql like 實現多關鍵詞搜索的方法全部內容了,希望大家多多支持維易PHP~
轉載請注明本頁網址:
http://www.snjht.com/jiaocheng/2922.html