SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    38911 Basic Bytes Free johnuk's Avatar
    Join Date
    Jul 2008
    Location
    Somerset, England
    Posts
    458
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem importing csv file

    Hi all,

    I am trying to upload a csv file (sample attached), to a simple two column table in mysql. Im getting the "Invalid field count in CSV input on line 1." error.

    The two fields are layed out as follows: -

    Field Type Collation Attributes Null Default Extra Action
    location_code varchar(50) utf8_unicode_ci No None Browse distinct values Change Drop Primary Unique Index Fulltext
    location_name varchar(50) utf8_unicode_ci No None Browse distinct values Change Drop Primary Unique Index Fulltext


    Does anyone have any idea where Im going wrong? thanks!
    Attached Files Attached Files

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,215
    Mentioned
    58 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by johnuk View Post
    Im getting the "Invalid field count in CSV input on line 1." error.
    what were you using to import the file?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    38911 Basic Bytes Free johnuk's Avatar
    Join Date
    Jul 2008
    Location
    Somerset, England
    Posts
    458
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hiya there, thanks for your reply. I found the problem in the end, only I cant remember now what I did to fix it (thats not good!)


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
  •