6.22.2006

Short String Summary with MYSQL

I got this snippet from a friend...thanks Andrew!

SELECT CONCAT(SUBSTRING(content,1,300),'...') FROM foo

The above snippets selects the first 300 characters(1-300) from the foo.content column, and then appends '...' to it.

Handy!