(Answer) (Category) WebGUI FAQ : (Category) Web Design :
How do I pull the first words, sentences, paragraphs from a SQL Query?
Here's a sample that will pull (space delimited, mind you) the first 5 words from Post.content
 SELECT CONCAT(SUBSTRING_INDEX(content, ' ',5) , 
 if(CHAR_LENGTH(content)-CHAR_LENGTH(SUBSTRING_INDEX(content, ' ',5))> 0, 
 '...',' ') COLLATE utf8_general_ci) as str from Post
I leave it as an exercise to the reader to filter the feeds. NOTE: Post.content already is a short version of the full content. I'd also *suggest* that one might include exit tags as indicated, although it could possibly break TIDY:
 SELECT CONCAT(SUBSTRING_INDEX(content, ' ',5) , 
 if(CHAR_LENGTH(content)-CHAR_LENGTH(SUBSTRING_INDEX(content, ' ',5))> 0, 
 '...',' ') COLLATE utf8_general_ci, '</b></u></i></p>' COLLATE utf8_general_ci)
 as str from Post

Sentences? change the ' ' to '.' and the count appropriately.
Paragraphs? change the ' ' to '</p>' or '<p>' and the count...
wg-fomATgwyDOTorg

[Append to This Answer]
Previous: (Answer) In a Weblog template of a CS (6.6+), how do I know where the Synopsis will end?
Next: (Answer) Cross-Site database access
This document is: http://www.gwy2.org/cgi-bin/fom?file=75
[Search] [Appearance]
This is a Faq-O-Matic 2.719.
This FAQ administered by ... Gerald Young