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

php - How can I edit my code to echo the data of child's element where my search term was found in, in XMLReader? -

jQuery Ajax Render Fragments OR Whole Page -

javascript - Iterate over array and calculate average values of array-parts -