PHP/MySQL - include plurals but exclude singulars

前端 未结 3 1524
挽巷
挽巷 2021-01-21 11:47

I am building a site with a requirement to include plural words but exclude singlular words, as well as include longer phrases but exclude shorter phrases found within it.

3条回答
  •  时光说笑
    2021-01-21 12:29

    You should consider using FULL TEXT SEARCH.

    This will solve your Bread/read issue.

    I believe use of wildcards here isn't useful. Lets say you are using '%read%', now this would also return bread, breads etc, which is why I recommended Full Text Search

提交回复
热议问题