Page 1 of 1

Search for literal line break string in mysql

Posted: Mon Dec 26, 2011 10:31 pm
by s.dot
I've a bunch of malformed table fields with the actual string "\r\n" in them. How can I search for the literal string (results show that I am searching for an actual line break and not the literal representation of them)?

I've tried:
[text]WHERE `field` LIKE '%\r%'[/text]

and \\r and \\\r and etc. Only tried matching the \r first because once i get that right i can add the \n in it.

Re: Search for literal line break string in mysql

Posted: Mon Dec 26, 2011 11:05 pm
by s.dot
Hmm, could be a bug in the phpmyadmin version I'm using.

From what I understand, I should be searching for WHERE field LIKE '%\\r%'
It returns results, but the results have linebreaks, not the linebreak character sequence like I am looking for.