Results 1 to 9 of 9

 

Thread: Quotation marks from datafeed DOUBLED in MySQL table

  1. #1
    Registered User

    Status
    Offline
    Join Date
    Jun 2004
    Location
    United Kingdom
    Posts
    81
    Thanks
    0
    Thanked 0 Times in 0 Posts


    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
    Cheers
    YJ

  2. #2
    Registered User

    Status
    Offline
    Join Date
    Jun 2004
    Location
    United Kingdom
    Posts
    81
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I kind of figure out what's wrong but still struggling on solving it. Any experts kind guys please help !!!

    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!!!!!!!!!

    Cheers
    YJ

  3. #3
    km8
    Registered User

    Status
    Offline
    Join Date
    May 2004
    Location
    Gondor
    Posts
    1,202
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, I'm no guru so this is quick n' dirty.
    Why not do a search and replace on the quotes before importing?
    Wordpad, Dreamweaver or excel will do that for you.

  4. #4
    Fraser's Avatar
    Registered User

    Status
    Offline
    Join Date
    Aug 2003
    Posts
    2,013
    Thanks
    1
    Thanked 1 Time in 1 Post
    Seems an odd way to supply the feed, which merchant is it and have you asked them if they can supply it any other way?

  5. #5
    Registered User

    Status
    Offline
    Join Date
    Jun 2004
    Location
    United Kingdom
    Posts
    81
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Cheers km8 and Fraser - ALL merchants (in AW) give the same format......

    They kind of have all fields enclosed by " - not a problem as that would make description field (most of the time with comma in it) being treated as a field - a good thing.

    The problem is my table appear to have extra "" after insertinga and it is these extra "" give me headache - I have really no idea where they come from - If there is a way to get rid of these the problem would be resolved I believe. So, where is these unwated "" come from????



    Cheers and thanks a lot for all kind help!!
    Cheers
    YJ

  6. #6
    Registered User

    Status
    Offline
    Join Date
    Aug 2003
    Location
    Derbyshire
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts
    One problem that happens allot with these feeds is that the shop will use a " in the actual description, it's used when describing clothes sizes etc and can mess up the whole " delimiting.

  7. #7
    Registered User

    Status
    Offline
    Join Date
    Jun 2004
    Location
    United Kingdom
    Posts
    81
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Problem resolved!!!!!!!!!!!! seem to be myself who's the one who "generated" the problem.

    What I did is download the csv file (in .php extension), open in Excel, delete first row (advertiser, name, brand......), then saved as .csv file.

    After that inserted the saved .csv file into my MySQL table - which resulted in unwanted quotes!

    After all I get back to the original file (.php) and directly insert it with [field enclosed by "" selected] [ line terminated by \n] selected - and it works!!!!! fit perfectly into my table !!!!!

    Sorry my dumb "going round the file" has wasting all your time but this really make me learnt a lesson - ALWAYS TRY ORIGINAL FILE FIRST!!!!!

    Cheers all guys and have a nice day
    Cheers
    YJ

  8. #8
    Fraser's Avatar
    Registered User

    Status
    Offline
    Join Date
    Aug 2003
    Posts
    2,013
    Thanks
    1
    Thanked 1 Time in 1 Post
    I have been downloading AW feeds trying to repeat the problem and was just about to post and say that my feeds were different from yours. As long as it's fixed thats the main thing!

  9. #9
    Registered User

    Status
    Offline
    Join Date
    Jun 2004
    Location
    United Kingdom
    Posts
    81
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yeah..... cheers Fraser
    Cheers
    YJ



Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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
  •  
To Top

Content Relevant URLs by vBSEO 3.5.0 RC2