I am using MySQL. My data has a column called text, which uses the TEXT data type.
text
There are several newlines for each record in this column. I want to
Given suggestion i.e. REPLACE(REPLACE(DBField, '\n', ''), '\r', '') won't work if there are invisible html code like \n \r. For that you have to use char code.
REPLACE(REPLACE(DBField, '\n', ''), '\r', '')
\n \r
Example:
REPLACE(REPLACE(REPLACE(DBField, CHAR(10), ''), CHAR(13), ''), CHAR(9), '')