Cakephp CSV files datasource
CSV Datasource for reading your CSV files Originally based on work of Siegfried Hirsch (Siegfried): http://bakery.cakephp.org/articles/view/csv-datasource-for-reading-your-csv-filesi
Licensed under The MIT License Redistributions of files must retain the above copyright notice.
Example:
/app/models/datasources/csv_sourse.php
public $csvFileConfig = array( 'datasource' => 'csv', 'path' => "/path/to/your/file.csv", 'header_row' => 7 // It use this row as header and start to read data from next row... previous rows will be ignored );
public $default = array( 'driver' => 'mysql', 'persistent' => false, 'host' => 'localhost', 'login' => 'user', 'password' => 'password', 'database' => 'test_database_name', 'prefix' => '' ); }