Lukenzo Posted April 16, 2020 Share Posted April 16, 2020 (edited) Hi. I am trying to execute csv import to database with: $query = " LOAD DATA LOCAL INFILE '$filePath' INTO TABLE " . self::TABLE_NAME . " FIELDS TERMINATED BY ';' LINES TERMINATED BY '\r\n' "; DB::getInstance()->execute($query); But I am getting "Warning: PDO::query(): LOAD DATA LOCAL INFILE forbidden" . If I do this with MysqliConnection() it works. How to enable MYSQLI_OPT_LOCAL_INFILE for PDO ? PS 1.7.6.4 Thank you in advance Edited April 16, 2020 by Lukenzo (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now