Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Sep 2007
    Posts
    137
    Thanks
    1
    Thanked 0 Times in 0 Posts

    importing data into mysql

    hi

    i need to import data into a table in mysql from phpmyadmin using the
    Import option instead of using insert statements.

    for example if the table has 10 fields should the file that needs to
    be uploaded have the same field names on top and the associated values.

    ideally should this be as an excel or csv file or text file.

    in each case please advice the format in which the data needs to be
    added into the csv/txt file.

    please advice.

    thanks.

  • #2
    Regular Coder
    Join Date
    Apr 2006
    Posts
    231
    Thanks
    9
    Thanked 1 Time in 1 Post
    I don't understand...

    You are importing from excel into mysql? If so, I'm not familiar with how excel has the output format, but I don't think it will be possible without altering the file.

    the MySQL imports use strictly SQL code. That's that "INSERT INTO BLA BLA BLA"...

    so if u can code sometihng that will alter the data and put it into sql form, or do it by hand, you're screwed.

  • #3
    Senior Coder o0O0o.o0O0o's Avatar
    Join Date
    Jan 2008
    Location
    C:\Windows\System32
    Posts
    1,018
    Thanks
    19
    Thanked 9 Times in 9 Posts
    That means you have table already created

    In that case you use csv file to import data in sql and just dive the
    delimiters in the options

    There are ready made scripts also available to import data in sql


  •  

    Posting Permissions

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