I´m trying to import a csv file and getting the error code
SQLSTATE[42000]: Syntax error or access violation: 1148 The used command is not allowed with this MySQL version
The funny thing is, that i´m using the same code for another table in the same database and it´s working. What i´m doing wrong?
try {
$pdo->exec("LOAD DATA LOCAL INFILE '$file' INTO TABLE example CHARACTER SET 'latin1'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\"' ESCAPED BY '\"'
LINES TERMINATED BY '\n' IGNORE 1 LINES (YEAR,MONTH,ARTIST_NAME,RELEASE_TITLE,BARCODE,ISRC,TRACK_TITLE,TRACK_VERSION,SHOP,TRANSACTION_TYPE,COUNTRY,QUANTITY,REVENUE)");
} catch(PDOException $e)
{
echo $e->getMessage();
echo "<br>";
}