开发者

mySQL database search exact phrase

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜