For Programmers: Free Programming Magazines  


Home > Archive > PHP SQL > October 2007 > How to delete \r\n after using Navicat in phpmyadmin/Navicat?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to delete \r\n after using Navicat in phpmyadmin/Navicat?
Tine Müller

2007-10-22, 7:04 pm

I have converted a xml-file to mysql with Navicat but the problem with the
xml-file was that the end of line code wasn't changed before I used Navaicat
so I had to look for it manually and change it in there but in Firebug I
still saw this code \r\n.

I have been told that this \r\n is characters 13,10 (CR, LF) and is the
standard DOS sequence for end-of-line.

Now when I try to geocode the adresses from phpmyadmin I got problems and
now I need help to search for this code and delete it to my script can
geocode the adresses without problem. I could do it manually but the
database has about 600 post. Can someone help with the code to use, please?

It look like this in phpadmin [screencast.com] and it should looke like this
[screencast.com]

/Tine


J.O. Aho

2007-10-22, 7:04 pm

Tine Müller wrote:
> I have converted a xml-file to mysql with Navicat but the problem with the
> xml-file was that the end of line code wasn't changed before I used Navaicat
> so I had to look for it manually and change it in there but in Firebug I
> still saw this code \r\n.
>
> I have been told that this \r\n is characters 13,10 (CR, LF) and is the
> standard DOS sequence for end-of-line.
>
> Now when I try to geocode the adresses from phpmyadmin I got problems and
> now I need help to search for this code and delete it to my script can
> geocode the adresses without problem. I could do it manually but the
> database has about 600 post. Can someone help with the code to use, please?
>
> It look like this in phpadmin [screencast.com] and it should looke like this
> [screencast.com]


UPDATE table SET column=REPLACE(column, '\r\n', '');

I do strongly suggest you do make a backup of the table before you will remove
the "carriage return/new line".

--

//Aho
Tine Müller

2007-10-22, 7:04 pm

I got the solution in another forum and it worked.:-)

update table_name

set columns_name = replace(column_name,"\r\n","")


"Tine Müller" <tinem@email.dk> skrev i en meddelelse
news:Pi4Ti.33$1P4.9@news.get2net.dk...
>I have converted a xml-file to mysql with Navicat but the problem with the
>xml-file was that the end of line code wasn't changed before I used
>Navaicat so I had to look for it manually and change it in there but in
>Firebug I still saw this code \r\n.
>
> I have been told that this \r\n is characters 13,10 (CR, LF) and is the
> standard DOS sequence for end-of-line.
>
> Now when I try to geocode the adresses from phpmyadmin I got problems and
> now I need help to search for this code and delete it to my script can
> geocode the adresses without problem. I could do it manually but the
> database has about 600 post. Can someone help with the code to use,
> please?
>
> It look like this in phpadmin [screencast.com] and it should looke like
> this [screencast.com]
>
> /Tine
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com