SQL Error when importing CSV


  • Robert
    Newbie 49 points
    August 25, 2016 at 12:04 am

    Hello,

    I am getting an error when trying to import a CSV file.

    WordPress database error: [Table ‘makeupyo_wp121.temp_24_08_2016_23_53_16’ doesn’t exist]
    LOAD DATA LOCAL INFILE ‘/REDACTED/uploads/2016/08/JewelleryNSW.csv’ INTO TABLE temp_24_08_2016_23_53_16 CHARACTER SET UTF8 FIELDS TERMINATED BY ‘,’ OPTIONALLY ENCLOSED BY ‘\”‘ ESCAPED BY ‘\\’ IGNORE 1 LINES (category post_title map_address1 map-city map-state map-zip map-country phone websitelink post_excerpt post_content)

    string(357) “LOAD DATA LOCAL INFILE ‘/REDACTED/public_html/wp-content/uploads/2016/08/JewelleryNSW.csv’ INTO TABLE temp_24_08_2016_23_53_16 CHARACTER SET UTF8 FIELDS TERMINATED BY ‘,’ OPTIONALLY ENCLOSED BY ‘\”‘ ESCAPED BY ‘\\’ IGNORE 1 LINES (category post_title map_address1 map-city map-state map-zip map-country phone websitelink post_excerpt post_content)” NULL error=,


  • Josh
    Super Guru 13,875 points
    August 25, 2016 at 12:44 pm

    Hello Robert,
    Seems like you have not set your csv file correctly.Please have a look at this >>https://s.premiumpress.com/index.php?/Knowledgebase/Article/View/27/0/using-excel-spreadsheets-csv


  • Robert
    Newbie 49 points
    August 25, 2016 at 1:52 pm

    Hi Josh,

    You are correct, i uploaded the sample and that worked. I had added pretty much the same column headers that were required but i must have messed up somewhere.

    Im trying to import a list of companies with the phone number, websites and company names. If I manage to import these will they be posted as listings or as something else eg a post?

    I have attached a sample


  • Robert
    Newbie 49 points
    August 25, 2016 at 1:53 pm

    sorry it wont allow me to attach the sample


  • Josh
    Super Guru 13,875 points
    August 25, 2016 at 2:14 pm

    The Csv Import plugin is used to import listings and its linked data.So you must include listings and their data.You cannot import only data eg phone numbers.You csv file must include post title/listing title.So in your case you must have the post title then you can add the phone number, websites and company names


  • Robert
    Newbie 49 points
    August 25, 2016 at 2:26 pm

    I have set the post title as the company name etc.
    Ive taken a screenshot for better understanding and attached it.

    Thanks

    Attachments:
    You must be logged in to view attached files.

  • Robert
    Newbie 49 points
    August 25, 2016 at 2:41 pm

    ive pretty much copied the sample but have added extra things like map_zip map_country still bungs out 🙁


  • Robert
    Newbie 49 points
    August 25, 2016 at 5:23 pm

    Nevermind I used a 3rd party app which worked


  • Josh
    Super Guru 13,875 points
    August 25, 2016 at 5:43 pm

    Thanks for updating Robert 🙂

Viewing 9 posts - 1 through 9 (of 9 total)

New Business Themes for WordPress 2020

Start your new website today!

View Business Themes