Import /Export csv file into mysql using php

If you are in trouble due to importing csv data into your mysql database and if you want do some operation on your csv data but you face limitation of csv then this post is for you because in php importing data from csv is very tedious work. And in csv operations on data are also difficult to handle.
MS Excel helps in csv data management and operations but it requires knowledge of excel functions. I had faced this trouble in our project where we needed to import csv file that contained product data with magento dataflow import export profile, but our product.csv file was not in proper format. If we do changes in csv file manually we require a lot of time so, we finally decided to first import csv data in mysql database and then with help of sql query make all the changes into data then we export data. We spent a lot of time to get this to work.  That’s why I am uploading this code to help people who are in are having same problems as we had with importing and exporting data into mysql. This code will also help magento users who do not have properly formatted csv files. For that first import data into mysql with given script then create a new table with mysql query as per reqired format then export your mysql data into csv format.

downlaod script for import/export csv into mysql

Speak Your Mind

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

You are commenting using your 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: