Substring() for Fields in MYSQL -
i don't understand why didn't work out:
select id,name,concat(substring(description,0,30),'...') desc_shortened, created_date,added_by products
even though there data inside of description
field. didn't see field example on mysql documentation tho. used pure strings instead of column names.
concat(susbtring(description,0,30))
returns ...
, that's all.
use substring(description,1,30)
instead.
Comments
Post a Comment