Import data from CSV file into a MySQL database

Few days ago, Client wanted to import a CSV file and all datas of this file will be inserted into a table in one project.For that, I implemented a class and contributed it in site as well.For this week,this class was top first downloaded the figure below.


And as a author rank of this week i was 5th. here attached the screen shot.


Class Name : fileImporter


This class can be used to import data from CSV file into a MySQL database.When any CSV or text file is imported by user,Firstly the file is uploaded a temp directory then the class open , read datas from this file and insert in a given MySQL database table.After then file will be deleted this temp directory. The class supports both tab and comma separated CSV files.

Download this class from here.Details example also explained there.

Please don’t  hesitate to knock me if you guys face any problem to install this class.


4 Responses to “Import data from CSV file into a MySQL database”

  1. Ripon Says:

    WOW… Kausar, very good contribution… thanks a lot…

  2. mdkausar Says:

    Viya, Thank you so much for your comment.

  3. Smin Rana Says:

    so far i know wonderful career having this guy

  4. Jahangir Says:

    Kawsar vi, It’s a great contribution for all other PHP developer, thanks a lot.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: