Page is a not externally linkable
- Code, Content, and Presentation
-- Databases
---- How to trim text in my query ?


phranque - 9:04 am on Oct 23, 2012 (gmt 0)


http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_substring
SUBSTRING(str,pos,len)
(returns) a substring len characters long from string str, starting at position pos



SELECT SUBSTRING(`mytextareacolumn`,0,200) AS `mytextarea200` FROM `my_table` WHERE `user_id` = [user_id]


Thread source:: http://www.webmasterworld.com/databases_sql_mysql/4511170.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com