By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,548 Members | 1,183 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,548 IT Pros & Developers. It's quick & easy.

single .csv file how to store the multiple tables using php

P: 4
I want to read data from single .CSV files using php & mysql How to store it into Mysql multiple tables
Mar 5 '12 #1
Share this Question
Share on Google+
2 Replies

P: 13,264
Use str_getcsv if you are using PHP 5.3 and above or fgetcsv if using older version to read the CSV.
For the mysql part there's lots of tutorials on how to do it. Just make sure that you write a more generic DAO layer than you can reuse.

Also consider loading the data directly into the database using MySQL's own LOAD DATE command:
Mar 6 '12 #2

P: 4
thanks for the reply r035198x
Mar 7 '12 #3

Post your reply

Sign in to post your reply or Sign up for a free account.