Hello and welcome to our community! Is this your first visit?
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
    Thanked 0 Times in 0 Posts

    importing file in phpmyadmin

    presently i have a table in which there are records and the fields are slno (this is a primary key auto increment), firstname, lastname, email, date(which inserts as a date format) these records are presenty being inserting from a html form. this works fine.

    i have additional data that is on paper and this paper data needs to be added to this table and the are numerous records that have to be inserted so executing an sql query from myphpadmin is not a good option. due to this i would lke to add the paper data first into a text file or csv file and then use the Import feature in phpyadmin so that this new data is added to the existing table along with the data that is already inserted through the form.

    please advice
    1. if a text file or csv file is preferrable.
    2. in what format should the data be entered in the case of
    a) text file & ) csv file

    should i mention slno, firstname, lastname, email, date
    on top of the file and add data accordingly.

    also as slno is auto increment do i need to specify the numeric number or is it optional and in case of date do i need to follow the same format as it is for previous records while entering the data manually into the text or csv file.


  • #2
    Regular Coder mic2100's Avatar
    Join Date
    Feb 2006
    Thanked 28 Times in 27 Posts
    no you don't have to specify a number when the entries are been created it will be filled in automattically.

    phpmyadmin does not import cvs or text files directly, it need to be in a SQL insert string. so you will have to get a 3rd party program to do this or create your own import script.

  • #3
    Senior Coder
    Join Date
    Apr 2007
    Quakertown PA USA
    Thanked 125 Times in 123 Posts
    phpMyAdmin will import data from a text file. On the SQL tab there should be a link that says Insert data from textfile. Clicking this link will bring up a page where you can describe the data in the file, how it is separated, etc.


    Posting Permissions

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