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

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -