"Keith" <[EMAIL PROTECTED]> wrote on 11/03/2004 09:50:35:
> 've had a good look through the manual and archives but can't find
> an answer. I'm pulling, among other things, a field from the DB that
> holds description data (a few paragrahps of text). I want to limit
> it so that it only pulls the first 50 words (or characters if thats
> not possible)
I think characters is possible: use the function LEFT(string, chars). See
also SUBSTRING().
If your texts is strictly space separated, SUBSTRING_INDEX(str,delim,count)
may be able to select words for you with ' ' as the delim.
Alec
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]