Saturday February 11, 2012 @ 11:03:32 GMT+10    ( Weather:  n/a )
Home » Weblog Archives

Powered byD's Bloggie
Weblog » Archive » 2005 » September » Day 29 » SQL displaying brief info
Browse by specific entry ...
 Hello World !SQL Joining 

SQL displaying brief info - 3:49 pm
Coding , SQL  -  poster 

This is how you display the first 100 characters of a string in your DB and add '...' at the back.

Display excerpt from a long string [ Hide ]
[ Highlight ] [ Text ]
SELECT CONCAT(SUBSTRING(acol, 1, 100), IF(LENGTH(acol) > 100, '...', '')) AS brief
FROM atable
 Hello World !SQL Joining 

Reader comments ( Add your comments )

- No comments (yet) -

Leave a public comment

Info Note: Neither BBCode nor HTML tags are supported currently.
Why ? Just to make my life easier and keep things simple.
Others: Comments that are longer than 1000 characters will be truncated.

    ) Info

Info

Info


Before you submit... verification

Please enter verification codes as seen in the image above to post your comment.
If you can't read the word, click here
(Your comment will be manually approved by admin before it's displayed to public)

$ view_blog.php 2009.09.17 18:16:41 $
Lost? | XML/HTML sitemap | Contact
38.107.179.242 , 22 queries , 0.2015s
Gzip enabled , CSS compressed , JS compressed
Copyright © 2005-2011 Darren's Outpost