I have csv file with following structure.
"Agency_Name","First_Name","Last_Name","Full_Name","email_address","Address","City","State","ZIPCode","County","Phone_Number","Fax_Number","Website","Timezone","Latitude","Longitude","ZIPType","CityType","CountyFIPS","StateName","StateFIPS","UTC"
"D Real","Ki","Alod-Mell","Ki Alod-Mell","[email protected]","Lake St","ka","AK","35-755","Stka","9071032","9077475","","Alka","53.0324","-133.339294","S","D","0220","Alaka","02","-3.0"
"retds","La","Mi","LaMi","[email protected]","Lake Street","Ska","AK","935","Stka","(747-4880","(947-2688","","Alasa","52.061324","-125.339294","S","D","020","Alaka","02","-9.0"
Here is my mysql query in codeigniter.
$query = $this->db->query('
LOAD DATA LOCAL INFILE "'.$file.'"
INTO TABLE '.$table.'
FIELDS TERMINATED by \',\'
ENCLOSED BY \'"\'
LINES TERMINATED BY \'\n\'
STARTING BY \'\'
IGNORE 1 LINES
');
but the problem is it is skipping first column for each row. As previously i was parsing each row and filtering out columns in array, it worked for small files but files with million of rows just stuck over there and server giving 500.
