KidsLovePC Contact Us
  Home   PHP  Graphics ASP  JavaScript   J2EE  HTML  JAVA   Swing   Webtip  Forums  Lyric  Free sheet music  Ringtones

Using phpMyAdmin Batch Insert data into MySQL

Assume you finished the lessons:

Prepare data file

Sometime, you have formatted data file. Assume they are semicolon delimited. For example, we have following contact information in a data file( semicolon delimited) and plan to insert it into our "Contact" table:

Harry 555-234-5890
Jerry 666-123-5678
Potter 888-234-1234

In the data file, the above data may look like

Harry;555-234-5890
Jerry;666-123-5678
Potter;888-234-1234

Insert data into MySQL

Launch your phpMyAdmin in browser. In the left side you see the a drop down menu, named "Databases", click on the drop down menu and select your database, like the following image:

php tutorial,mysql,phpmyadmin,create database

The number in () shows how many tables in that database. We need insert into database phonebook. So we select it. Left side window will change like following:

php tutorial,mysql,phpmyadmin,create database

Click on table: contact. You will see a text line "Insert data from a text file into the table" on the bottom of the right panel. Click on it. You will see the right panel change to following image:

php tutorial,mysql,phpmyadmin,create database

Click on "Browse" button to locate your data file.

In "Fields terminated by", we accept the default ";" because our data file is semicolon delimited. If you use tab delimited files, input "\t" instead of ";".

In "Fields enclosed by", we clear the default value and leave it empty since we didn't enclose our data.

There is no special character in our data file, so we set "Fields escaped by" empty.

We accept the default value "Lines terminated by" because our data is one record per line.

Leave "Column names" empty since our insert value used all 2 columns in table "contact": name and phonenumber.

Then click on "Submit" button.

You will see a message in the updated panel saying

"Inserted rows: 3 (Query took 0.0007 sec)".

Browser data in MySQL

Now, you may check you insert by clicking on "Browse" tab. You will see the following image:

php tutorial,mysql,phpmyadmin,create database

Congratulations. You just batch-insert your data into MySQL.

PHP Calendar
Comprehensive PHP Web Calendar
Configurable PHP Calendar
PHP Calendar
PHP Image Processing
PHP grahic softwares
PHP create real-time dynamic chart
create antispam image(image verification)
Add water mark to image
PHP Image processing introduction
Add text on Image
Create thumbnail for image
Create image from text on fly
PHP code sample
PHP create dynamic PDF with FPDF
PHP create dynamic PDF with PDFLib
PHP create dynamic PDF with ClibPDF
Improved PHP configurable hit counter
Install phpMyAdmin,MySql, PHP
PhpMyAdmin export/import data
A simple PHP RSS feed reader
PHP include (SSI)
Working with Forms
PHP formmail Generator
Using phpMyAdmin Create Database
Insert Form Data into Database
Retrieve data from Database
Retrieve multiple records
Batch insert text using phpMyAdmin
Using phpMyAdmin insert binary file
Insert binary file using PHP code
Using form insert binary file into MySQL
Retrieve binary file from MySQL
Image hosting business in minutes
Send HTML mail in PHP
Send bulk emails in PHP
Polling/Rating System in PHP
Polling/Rating System in PHP(radio button)
Check visitor's IP address
Check reciprocal link
PHP tutorial
What is PHP?
Install PHP on Windows XP (part1)
Install PHP on Windows XP (part2)
PHP open and closing tags
PHP types
Variables
Constants
Operators(part1)
Operators(part2)
Logic Structures
Include files
Loops
Set cookie and delete cookie
Most often used MySQL functions

 

 

Printer Inkjet A Z lyricsLearn ChineseHome|PHP|Swing|HTML|JavaScript|ASP|JAVA|Forum|WebTip|Contact Us
Copyright © kidslovepc.com All rights reserved(new). Privacy|Copyright
designed by info@kidslovepc.com

Please help us cover the web site maintenance fee.
barcode scanner Thermal Printer credit card machine bar code printer