php - How can I filter a MySQL result by the amount of words in a column? -


I am trying to filter the results of a MySQL query with the number of words within a table column.

For example, there are 10 testimonials with my column ID, name, URL, testimonials, and five of those lines have a testimonial column with more than 100 words to create a certificate.

How do I use a query to return only those testimonials columns that are less than 100 words?

It's not that the way I did it, it's very Large, but ...

  SELECT * FROM table WHERE LENGTH (field) - LENGTH (Ripley (field, '', '')) + 1 & Lt; 100   

It actually counts the spaces ... but it can be enough for you.

Comments