开发者

mySQL database search exact phrase

开发者 https://www.devze.com 2023-02-20 17:54 出处:网络
what is the easiest way on a wordpress site to have a database of unique ID numbers and have a search field that searches the exact phrase and displays results开发者_高级运维?create a table to have un

what is the easiest way on a wordpress site to have a database of unique ID numbers and have a search field that searches the exact phrase and displays results开发者_高级运维?


create a table to have unique ids, and words

To search by a word then use -> SELECT * FROM words_table WHERE word LIKE "%ed%"; This will return results where ed is in words such as end*ed*, start*ed*, startl*ed*, *ed*ucation

To search by an id use -> SELECT * FROM words_table WHERE id = {$id}

0

精彩评论

暂无评论...
验证码 换一张
取 消