Disable Line Break \n

Discussion in 'Databases' started by gahoo, Dec 19, 2007.

  1. #1
    When I export using PHPMyAdmin it automatically adds \n where there are line breaks. How do I stop it from doing this?

    Thanks.
     
    gahoo, Dec 19, 2007 IP
  2. codesome

    codesome Peon

    Messages:
    98
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I think there is no way to stop it, because \n is a part of your data.
     
    codesome, Dec 19, 2007 IP
  3. gahoo

    gahoo Peon

    Messages:
    837
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #3
    When I view my tables there isn't any \n, only when I export.
     
    gahoo, Dec 19, 2007 IP
  4. linkstraffic

    linkstraffic Well-Known Member

    Messages:
    388
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    133
    #4
    Why do you need to do that?
    They are just line breaks.
     
    linkstraffic, Dec 19, 2007 IP
  5. tonyrocks

    tonyrocks Active Member

    Messages:
    1,574
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    88
    #5
    \n is for new line...some times when you convert from unix db to a winders db, it may also tag on a ^M as well. You can parse your data within your query and perform a string replace for the \n with a nothing string.
     
    tonyrocks, Dec 19, 2007 IP
  6. gahoo

    gahoo Peon

    Messages:
    837
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Some of my content has \n in it, such as URLs. :(
     
    gahoo, Dec 19, 2007 IP
  7. tonyrocks

    tonyrocks Active Member

    Messages:
    1,574
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    88
    #7
    I don't understand why a URL would have a \n. I could see a & and a ? but not a \n
     
    tonyrocks, Dec 19, 2007 IP
  8. gahoo

    gahoo Peon

    Messages:
    837
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Links to media I should say.
     
    gahoo, Dec 19, 2007 IP