How can I get the most popular words in a table via mysql?

后端 未结 3 1701
旧时难觅i
旧时难觅i 2021-01-20 09:51

I\'ve got a table with a BLOB column. What I want to do is get it to be able to pick out words and list them in order.

For example if it contained:

  • Bob
3条回答
  •  终归单人心
    2021-01-20 10:16

    Don't think there is any built in MySQL function to do this so you are probably best using PHP to do the work for you using either explode(' ', $myString) or str_word_count($myString, 1) to create an array containing each word. Then loop through each word in the array and count them.

提交回复
热议问题