Submit Your Article Forum Rules

Results 1 to 5 of 5

Thread: Importing to phpmyadmin

  1. #1
    Senior Member ristenk1's Avatar
    Join Date
    Apr 2009
    Posts
    108

    Importing to phpmyadmin

    Hi yall, I'm trying to figure out how to import a small excell sheet (about 80 rows) into my mySQL database. I'm using phpmyadmin but I'm not sure how I'm suppose to set up my fields in excell so that it imports properly.. I've saved it as a csv but it keeps telling me that I need to have each field end with either a semicolon or coma...I've tried both... and then enclosed in quotes but I haven't been successful at importing yet... jeez, it's giving me a headache....is it normal to have to wrap every single entry in quotes and end them with semicolons or comas?... is there a faster way for me to get my existing excel data into this format? when I exported some sample data in my table into a csv file it wrapped all of the data with:

    "field entry&quote;

    I'm just getting started with this so sorry if these questions seem ridiculous but I appreciate any and all help!!

  2. #2
    WebProWorld MVP DaveSawers's Avatar
    Join Date
    Dec 2006
    Location
    Lunenburg, Nova Scotia, Canada
    Posts
    704
    If the field you are trying to import to is text of some sort, then quotes are required for items in that field before you can import them. If you are importing numbers (real or integer) then those fields should not be in quotes.

    Text needs to be in quotes because of course, you may be trying to import some text that includes your comma or semi-colon separator.
    Dynamic Software Development
    Hidden Content

  3. #3
    Rest in Peace 1946 - 2013 deepsand's Avatar
    Join Date
    May 2004
    Location
    State College, PA
    Posts
    16,376
    Quote Originally Posted by ristenk1 View Post
    ... is it normal to have to wrap every single entry in quotes and end them with semicolons or comas? ...
    No, it is not; at least not if one is following the standard for CSV files.

    Double-quotes are properly needed only where a data field value includes the escape character.

    Unfortunately, very many have abused/misused CSV to the point where the standard breaks under their application(s).

    To avoid these sort of problems, I suggest using a tab-delimited (TXT) file wherever possible.

  4. #4
    Member
    Join Date
    Aug 2011
    Location
    Dallas, Texas
    Posts
    36
    Hi Ristenk1,
    I'm curious, have you tried to use another client to import such as Navicat lite? It's a desktop client for Mac or windows and can be configured to connect to all your projects/databases... There is a free/lite version...

    http://www.navicat.com/en/download/download.html

    We use it to import IP2Location database updates because the files are so large.

  5. The following user agrees with AciveLite2k:
  6. #5
    Senior Member
    Join Date
    Jun 2004
    Posts
    190
    There is a MySQL ODBC connector you can use. Details are here Excel to MySQL

Posting Permissions

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