Count occurrences of a word in a row in MySQL

后端 未结 9 998
野趣味
野趣味 2020-12-19 08:41

I\'m making a search function for my website, which finds relevant results from a database. I\'m looking for a way to count occurrences of a word, but I need to ensure that

9条回答
  •  情话喂你
    2020-12-19 09:27

    This is not the sort of thing that relational databases are very good at, unless you can use fulltext indexing, and you have already stated that you cannot, since you're using InnoDB. I'd suggest selecting your relevant rows and doing the word count in your application code.

提交回复
热议问题