Results 1 to 4 of 4

Thread: import csv
      
   

  1. #1
    Jenny is offline Staff Sergeant
    Join Date
    Dec 2005
    Posts
    45

    Default import csv

    Hi,

    I would like to import a csv into a db that already contains data (without destroying that data).

    I am given some CSV options in phpMyAdmin and need some advice.

    Do I leave the column names field blank? Also, it says the fields are searated by ; but surely the whole point of CSV is that fields are separated by , or is that wrong?

  2. #2
    Jenny is offline Staff Sergeant
    Join Date
    Dec 2005
    Posts
    45

    Default Re: import csv

    Also, if one of the fields is "auto-increment" (the id field), then do I leave the id field out of the CSV file that I am importing?

  3. #3
    Karen Mac's Avatar
    Karen Mac is offline General
    Join Date
    Apr 2006
    Location
    X marks the spot
    Posts
    8,353

    Default Re: import csv

    Jenny

    It would depend on what kind of database you are uploading to. CSV can also be seperated by the semi colon. Usually you can tell it that the top row is titles or headers and to create or skip the first row.

    If you are uploading to some sort of storebuilder I suggest you make your categories, and add one or two products, then download that file, and then format your new file to match it. Fewer headaches that way all the way around.

    Karen

    VodaHost

    Your Website People!
    1-302-283-3777 North America / International
    07031847328 / United Kingdom

    ------------------------

    Top 3 Best Sellers

    Web Hosting - Unlimited disk space & bandwidth.

    Reseller Hosting - Start your own web hosting business.

    Search Engine & Directory Submission - 300 directories + (Google,Yahoo,Bing)



  4. #4
    Join Date
    Mar 2006
    Location
    Mallorca, Spain
    Posts
    6,313

    Default Re: import csv

    If you are importing to a Mysql database then you have the option of changing the default (;) to a (,)

    Leave the auto increment field out

    If I were you, I would copy the table first and then import a single record/line first and then review the result.

    You can always delete any records that you import anyway.

Thread Information

Users Browsing this Thread

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

     

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49