>>You could use the LEFT() function to return for instance the 200 first
>>characters:
>>
>>SELECT LEFT(article,200) AS start_of_article
>>   FROM articletable WHERE ...
>>
>>You could also use the SUBSTRING_INDEX() function, if your lines are
>>separated with \r\n:
>>
>>SELECT SUBSTRING_INDEX(article,'\r\n',2) AS two_first_lines
>>   FROM articletable WHERE ...
>>
>><URL: http://dev.mysql.com/doc/mysql/en/string-functions.html >
>
> Is there a method which uses word counting?

you could count spaces.

like above:

SELECT SUBSTRING_INDEX(article,' ',40) AS two_first_lines FROM
articletable WHERE ...

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to