Solved with:
This script is full suported:
LOAD DATA LOCAL INFILE 'file.csv' INTO TABLE tablename FIELDS TERMINATED BY ',' LINES TERMINATED BY ' ' ( `Col1`, `Col2`, `Col3`)
But i merge it with other in some Query Like that:
DELETE FROM tablename WHERE date BETWEEN '$Date1' AND '$Date2'; ALTER TABLE tbalename AUTO_INCREMENT = 1; LOAD DATA LOCAL INFILE 'file.csv' INTO TABLE tablename FIELDS TERMINATED BY ',' LINES TERMINATED BY ' ' ( `Col1`, `Col2`, `Col3`);
this is wrong, becouse $PDO->exec() Cant return the number of affected table or rows.
Instead of it, to solve i need past an array, becouse my script support it like that:
$stmtpre[1] = "DELETE FROM tablename WHERE date BETWEEN '$Date1' AND '$Date2';"; $stmtpre[2] = "ALTER TABLE tbalename AUTO_INCREMENT = 1;"; $stmtpre[3] = "LOAD DATA LOCAL INFILE 'file.csv' INTO TABLE tablename FIELDS TERMINATED BY ',' LINES TERMINATED BY ' ' ( `Col1`, `Col2`, `Col3`);";
Same this: https://stackoverflow.com/a/52370701/9632001
$affectedRowsfrom. What isvardump?$pdo->exec()call.exec().echo vardump($affectedRows);??? And Vardump is the metod to outpud the return data.