CodeIgniter Forums
crlf in mysql - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: crlf in mysql (/showthread.php?tid=27508)



crlf in mysql - El Forum - 02-12-2010

[eluser]frist44[/eluser]
I have an emailtext model that I'm using to send emails, but keep the content in one place and replace the items that need replacing in the code. So i put a template into mysql and I'm having trouble getting carriage return line feeds out of the message.

When it was in code, I would have: "Line 1\r\nLine 2".

I need to be able to insert text into my database and have it come out like that. I put that text in and I just see actual \r\n in the text of the email.

How can I go about putting CRLF into mysql?