SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard dethfire's Avatar
    Join Date
    Aug 2000
    Posts
    2,477
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    import csv to mysql phpmyadmin questions

    I have a csv file that is formatted as such:

    Code:
    1,1,Abdominal Abscess
    1,2,Abortion Septic
    1,3,Abscess
    1,4,Acinetobacter Infections
    1,5,AIDS-Related Opportunistic Infections
    1,6,Anaplasmosis
    1,7,Anthrax
    1,8,Arthritis Infectious
    1,9,Arthritis Reactive
    1,10,Aspergillosis
    
    ...

    In phpmyadmin I have the following options:

    Replace table data with file
    Ignore duplicate rows
    Fields terminated by
    Fields enclosed by
    Fields escaped by
    Lines terminated by
    Column names


    and I'm really not sure what to put in for these? anyone know?
    Free Science Homework Help
    http://www.physicsforums.com

  2. #2
    SitePoint Wizard guelphdad's Avatar
    Join Date
    Oct 2003
    Location
    St. Catharines, ON Canada
    Posts
    1,707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Replace table data with file
    Ignore duplicate rows
    Fields terminated by -- you'd want a comma since you have one after each field
    Fields enclosed by -- use a " here just in case you have ' in your data like O'Toole
    Fields escaped by
    Lines terminated by -- usually \r\f if you are doing it manually, not sure in phpmyadmin
    Column names -- these are used only if you are importing data into specific rather than all columns

  3. #3
    SitePoint Member
    Join Date
    Nov 2010
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by guelphdad View Post
    Replace table data with file
    Ignore duplicate rows
    Fields terminated by -- you'd want a comma since you have one after each field
    Fields enclosed by -- use a " here just in case you have ' in your data like O'Toole
    Fields escaped by
    Lines terminated by -- usually \r\f if you are doing it manually, not sure in phpmyadmin
    Column names -- these are used only if you are importing data into specific rather than all columns

    Hope this tool may help you
    http://www.ronithomas.com/csv-to-mysql-converter/


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
  •