I'm trying to select rows from my database that has over 25 words, but I'm getting an error. What am I doing wrong, and how do I fix it?
SELECT input, LENGTH( input ) - LENGTH( REPLACE( input, ' ', '' ) ) +1 num
FROM confused
where num > '25'
LIMIT 0 , 30
Error:
#1054 - Unknown column 'num' in 'where clause'