0 Replies - 1387 Views - Last Post: 17 May 2007 - 05:38 AM

#1 girasquid   User is offline

  • Barbarbar
  • member icon

Reputation: 108
  • View blog
  • Posts: 1,825
  • Joined: 03-October 06

Short String Summaries

Posted 17 May 2007 - 05:38 AM

Description: Change the third value in the SUBSTRING() call to affect how many characters of the text are placed before the "...". Change the '...' segment to change what appears at the end of the summary text.This snippet can be used to create a short summary of a string based on the value of a text column. It will take the first 300 characters and then append a "..." to the end of what it reutrns.
SELECT CONCAT(SUBSTRING(column_name,1,300),'...') FROM foo


Is This A Good Question/Topic? 0
  • +

Page 1 of 1