SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Dec 2005
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem exporting with PHPMYADMIN

    Hi, I have a serious problem exporting a largish database (23000 records) with PHPMYADMIN. The problem is that the records which contain lower quotes ( „ ) in any of the fields get truncated in the exported .sql (or .csv) file. For example if there's a record with three fields id, name, occupation and the contents are respectively 235, Jessy „The Body" Ventura, wrestler then the exported line would be

    INSERT INTO BLAH VALUES (235, "Jessy ;

    instead of

    INSERT INTO BLAH VALUES (235, "Jessy „The Body\" Ventura", "wrestler");

    My hosting company is using phpMyAdmin 2.7.0-pl1

    Can anyone think of a way to work around this? I need to transfer the data to another database, so I need to export it somehow. If nothing else, I can replace the double lower quote with a double upper quote (it's all the same) but I don't know which query should I use (my SQL is amateurish at best). Also if there is a more elegant way of exporting this database, please let me know, thanks!

  2. #2
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    try the "use hexadecimal for binary fields" checkbox on the export screen. it will make your file larger, but i don't think you'll have this problem.

  3. #3
    SitePoint Member
    Join Date
    Dec 2005
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by longneck
    try the "use hexadecimal for binary fields" checkbox on the export screen. it will make your file larger, but i don't think you'll have this problem.
    It was already on and there were no binary fields. Other characters also cause the lines to truncate. These include:









    This is really pissing me off, I'm behind schedule because of the damn phpMyAdmin bugs.

  4. #4
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    oh, right. that would only work for TEXT or BLOB fields, but you're probably using VARCHAR.

    can you check that you are using UTF-8 as the connection character set? click on the house button in the left column and make sure the language is set to a UTF-8 language. also, when exporting pick ZIP or GZ for the output so that your browser doesn't accidentally mangle the output.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •