SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict D3V4's Avatar
    Join Date
    May 2010
    Posts
    370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Import a CSV file from PhpMyAdmin

    I have a problem while importing a CSV file in PhpMyAdmin. This file contains all the values that I want to insert in the database, separated by commas. When I import them I explicitly tell PhpMyAdmin that the fields are separated by commas, however, after the import is complete, the commas are part of the field too, they are not eliminated.

    Example: if in the csv file I have this line:

    Code:
    firstvalue,secondvalue,thirdvalue,...
    After the import what I have is that in the first column of the database I have the value "firstvalue,", in the second one I have "secondvalue," and so on, even if commas should be eliminated.

    What am I doing wrong? Is there some other option in PhpMyAdmin that I've missed?

  2. #2
    SitePoint Addict D3V4's Avatar
    Join Date
    May 2010
    Posts
    370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok let me change the questions: is it possible to import one column at a time from a csv file?


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
  •