Page 1 of 1

Limit Text length/word count

Posted: Fri Apr 11, 2003 3:42 pm
by ijasont
I have large articles stored in my MySQL db and I want to only display 100 words from the top of each article in a 'list all articles page'.

How do I do this?

thanks for the help
Jason

Posted: Fri Apr 11, 2003 8:50 pm
by volka
you might use SUBSTRING(str,pos,len) to limit the number of characters returned.
http://www.mysql.com/doc/en/String_func ... ml#IDX1183