[thelist] MySQL extracting a teaser from a text field

Frank lists at frankmarion.com
Mon Aug 22 17:33:29 CDT 2005


At 05:27 PM 2005-08-22, you wrote:
>Unfortunately this has to work in MySQL 3.23, so subqueries aren't an option.

Have you considered using your favourite server side language? Simplest 
solution in my books. Alternatively, you could cut it off at X chars (even 
though that's not particularly graceful) or even every X spaces. If you 
assume that a sentence contains 10 spaces, you get the contents of and use 
a regex to make space #10 your delimiter.



Frank Marion     lists at frankmarion.com      Keep the signal high.





More information about the thelist mailing list