February 18, 2009

How are lie breaks stored in a MySQL database and how do I get rid of them?

mysql
winkelthorp asked:


Normally line breaks in code are “\n” but how are they stored in a MySQL database? I need to take them out so that I can properly display some content. No, I do not mean a “
” I mean a line break in the CODE. Thx in advance!

Tags: , ,

Filed under Programming & Design by administrator

Permalink Print

Comments on How are lie breaks stored in a MySQL database and how do I get rid of them?

February 21, 2009

☻HominoIdea☻ @ 1:57 am

Better to use post in your form and retrive the data from texarea using request.form(”txt”). Here is what I would normally do:
—————————————————–
mytxt = request.form(”txt”)
‘ use one of the following depend how you want to display your data
mytxt = replace(mytxt, “”, Chr(13)) ‘ convert html tag into new line
mytxt = replace(mytxt, Chr(13), “”) ‘ convert new line/break into html tag

You may use \n instead of Chr(13)

cheers