[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

MySQL and new lines

Mark Adkins

2/18/2008 12:59:00 AM

Hi,

So I was having trouble earlier with getting MySQL to accept single
quotes from a textarea, but I got that resolved using both the MySQL
escape_string and the CGI escape method (I finally settled on the
escape_string), and that's taken care of that problem.

However, I can't seem to figure out how to keep newlines that are
inserted by users? I've looked around on Google and can't seem to find
any answers. I've tried gsub to replace the \n with a \n<br /> (I saw
that method employed with PHP's str_replace, but no luck here).

Any other suggestions or solutions?

Thanks a lot,
Mark
--
Posted via http://www.ruby-....