Click to See Complete Forum and Search --> : mysql selecting limited # of characters from row


nomo_green
12-28-2002, 02:15 AM
anyone know how to select a limited # of characters from a row (which is text). the row is a text blob, and i just want to show a preview (ie-select limited # of characters) of the text.

be something like select * from table where char#? <=50;

any ideas?

thx all:D

theN
12-28-2002, 03:48 AM
:( I'm no expert at this, but you might want to take a look at the following functions in the MySQL manual 6.3.2 String Functions (http://www.mysql.com/doc/en/String_functions.html) -
* LEFT(str,len)
* RIGHT(str,len)
* SUBSTRING(str,pos,len)
* SUBSTRING(str FROM pos FOR len)

HTH
theN