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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jeya1985
    New Member
    • Mar 2012
    • 4

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

    I want to read data from single .CSV files using php & mysql How to store it into Mysql multiple tables
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    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:http://dev.mysql.com/doc/refman/5.1/en/load-data.html

    Comment

    • jeya1985
      New Member
      • Mar 2012
      • 4

      #3
      thanks for the reply r035198x

      Comment

      Working...