logo       

\r\n: msg#00259

php.tcphp

Subject: \r\n

I'm stuck on something silly - but can't figure it out, and was hoping
someone out here knows this one off the top of their head.



I have a MySQL table that has descriptive text stored in it, and we allow
line feeds in the text. When I "export as sql scripts" from SQLyog, SQLyog
gets the escaped versions of line feeds into the output text as "\r\n" -
which is great.



Unfortunately, sql from SQLyog doesn't work in Oracle (because of all the
stuff I posted in an earlier rant - my apologies for that). So, I have
written a quick and dirty utility to generate insert statements and write
them to a text file, but the line feeds are getting interpreted and the text
is going to the output file with line feeds in there instead of the '\r\n' -
so my sql is failing.



I am not double-quoting anything - the strings are going straight from the
$row[field] to a string variable, ala $s = $row['description'].



I can strip out the '\r\n' with a str_replace, but I would prefer to keep
them in there if possible.



Thanks in advance -



Geoff



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise