Results 1 to 4 of 4
  1. #1
    Newbie
    Join Date
    February 21st, 2005
    Posts
    3
    Question Quotation marks from datafeed DOUBLED in MySQL table
    Dear ALL:

    Got a quick question about datafeed. While importing merchant's csv files, all entries in each field are enclosed within quotation marks, such as:
    name -- "xxx"
    brand -- "yyy"
    and these become ""xxx"" & ""yyy"" in my table. The first and last field though do not have any quotation marks will appear as "FIRST & LAST" -- i.e. only one for first entry as "open quotation" and one for last entry as "close quotation"

    ALL these quotations show up at my result.php page -- how could I eliminated this? Best would be eliminate them to appear in my table at first place. I am referring to datafeed from AW, and I am using phpMyAdmin plus MySQL.

    Thanks for all help guys! Cheers

  2. #2
    Newbie
    Join Date
    February 21st, 2005
    Posts
    3
    I kind of figure out what's wrong but still struggling on solving it. Any experts kind guys please help !!! that would really be a BIG HELP and very very appreciated - thanks in advanced.

    Problem is: in merchant's csv file, the rows/field are enclosed in "" and seperated by , like:

    A, "B", "C", "D", "E", "F", "G", H

    but when inserted into my table, it became:

    "A, ""B"", ""C"", ""D"", ""E"", ""F"", ""G"", H"

    So when I chose field enclosed by "" it would only insert 1 row and all into the first column - treating ABCDEFGH as one entry enclosed by the first and last "" (don't know where these quotes come from - not in merchant's table though!)

    But if I left the field "enclosed by" empty, all fields and rows could be inserted - fine - but with all quotation marks as shown above!!!! and that make my table practically unusable!!!!

    Any suggestions, helps, advices, or whatever????????? Just can't figure out what can I do now.... Have been looking for solution for days.... please.... help....

    BIG THANKS!!!!!!!!!

  3. #3
    Newbie
    Join Date
    January 18th, 2005
    Location
    Singapore
    Posts
    10
    Use fgetcsv().

  4. #4
    ABW Ambassador FFoc's Avatar
    Join Date
    January 18th, 2005
    Posts
    1,015
    Quote Originally Posted by Gib
    Problem is: in merchant's csv file, the rows/field are enclosed in "" and seperated by , like:

    A, "B", "C", "D", "E", "F", "G", H

    but when inserted into my table, it became:

    "A, ""B"", ""C"", ""D"", ""E"", ""F"", ""G"", H"

    So when I chose field enclosed by "" it would only insert 1 row and all into the first column - treating ABCDEFGH as one entry enclosed by the first and last "" (don't know where these quotes come from - not in merchant's table though!)

    But if I left the field "enclosed by" empty, all fields and rows could be inserted - fine - but with all quotation marks as shown above!!!! and that make my table practically unusable!!!!
    Code:
    LOAD DATA INFILE 'file.csv' INTO TABLE table FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    If you are using phpmyadmin, be sure to check the 'OPTIONALLY' box.

  5. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Mysql Table Definition for Google Aff Network Datafeeds
    By Uncle Rico in forum Programming / Datafeeds / Tools
    Replies: 11
    Last Post: December 23rd, 2009, 12:35 PM
  2. Update Mysql Table Using Inner Join Problem
    By Uncle Rico in forum Programming / Datafeeds / Tools
    Replies: 8
    Last Post: March 26th, 2009, 08:42 PM
  3. Going crazy trying to create or add indexes to MySQL table
    By writerguy in forum Programming / Datafeeds / Tools
    Replies: 9
    Last Post: August 2nd, 2008, 05:07 PM
  4. Replies: 6
    Last Post: February 20th, 2008, 08:05 AM

Posting Permissions

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