Hi,
I want to write a code in which .csv file can be import and it could be save in MySQL database.I have already created a database called import having table with id,name,size,type content.There shold be page in which we can browse .csv file and be uploaded.After that it could save in sql databse.
Please provide me the complete code.
Thanks in advance..
Import csv file in mysql database
Moderator: General Moderators
Re: Import csv file in mysql database
No. We'll help you but we won't write it for you.biplob wrote:Please provide me the complete code.
Use fgetcsv to read from the file (after fopening first, of course), build the query, then use mysql_query to execute it.
A loop or two, maybe some fancy array work, and you're done.
Re: Import csv file in mysql database
nobody here is going to write code for you, but point you in right direction .......
there are tons of examples on "http instances" how to do it
use functions
fgetcsv
mysql_query
there are tons of examples on "http instances" how to do it
use functions
fgetcsv
mysql_query
-
peter162in
- Forum Newbie
- Posts: 12
- Joined: Mon Jul 06, 2009 11:37 am
Re: Import csv file in mysql database
USE PHPMYADMIN TO IMPORT CSV . IT IS VERY EASY AND SIMPLE RATHER GOING FOR A CODE.
Re: Import csv file in mysql database
You may have noticed the subtitle of this forum: "The Developer's Network". If you want code written for you, you could post in the Jobs forum here and one of our developers might make a bid for writing it for you.biplob wrote:Please provide me the complete code.