Posts Tagged ‘import’

Import CSV file into database using CodeIgniter

Posted in Snippets Ideas on July 14th, 2010 by admin – Be the first to comment

CSVReader is a library for CodeIgniter that can help you importing CSV files into database using CodeIgniter framework. The library uses fgetcsv function from PHP to get the content from CSV file and then iterates over the records returning an array as result.

Then, you can iterate the parsed results from the CSV file to insert them into the database easily using a foreach statement. For example, you can refer to Clooner’s proposal here.

This CSVReader library can be really helpful in case you need to import large CSV files into the database using a CodeIgniter application, but also can be useful to import Excel files into the database or any other database file that can be exported to CSV. For Excel, you can export the results using comma separated values and then use this approach.

Related searches:

  • codeigniter import csv
  • codeigniter csv import
  • codeigniter CSV
  • import csv codeigniter
  • codeigniter upload csv
  • csv import codeigniter
  • csv codeigniter
  • codeigniter csvreader
  • codeigniter read csv
  • csvreader codeigniter