[thelist] MySQL extracting a teaser from a text field

James Hardy evolt at weeb.biz
Wed Aug 24 06:27:27 CDT 2005


Noah St.Amand wrote:
> I'm trying to find the best way to extract a teaser from a text field in 
> MySQL. Most of the time I can just take the first sentence, like this:
> 

I do this for one of my websites and rather than working with sentences, 
I cut it off at the first space after the 200th character then append an 
ellipsis (well three full stops actually because I am typographically lazy)

I find that cutting a sentence off midway is usually a little more teasing.

-- 
James Hardy



More information about the thelist mailing list