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

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -