Adding a line break in MySQL INSERT INTO text

后端 未结 10 2093
太阳男子
太阳男子 2020-12-07 22:07

Could someone tell me how to add a new line in a text that I enter in a MySql table?

I tried using the \'\\n\' in the line I entered with INSERT I

10条回答
  •  暖寄归人
    2020-12-07 22:22

    In SQL or MySQL you can use the char or chr functions to enter in an ASCII 13 for carriage return line feed, the \n equivilent. But as @David M has stated, you are most likely looking to have the HTML show this break and a br is what will work.

提交回复
热议问题