Trying to insert a CSV to a table via LOAD DATA LOCAL INFILE. It doesn't show errors but table is empty (CSV is not empty). There is a workaround doing foreaches and manual inserts but it's much slower compared to LOAD DATA INFILE.
Any suggestions?
$resource = Mage::getSingleton('core/resource');
$write = $resource->getConnection('core_write');
$filename = Mage::getBaseDir()."/var/mdb_processed/parts.csv";
$query = <<<eof
LOAD DATA LOCAL INFILE '$filename'
INTO TABLE ppi_parts
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' lines terminated by '\n'
ignore 1 lines
(partID,sku,isFreight,quantity,price,lastCost,vwCode,shortDesc,longDesc,headline,consumerDesc,salesMessage,relatedProd1,relatedProd2,weight,oversized,corePrice,titleMetaDescription,metaKeywords,fits,notes,seoField,location)
eof;
$write->query($query);