I have a huge amount of data that is generated using a PHP script and must be inserted into the database. I tried various solutions with different results, but the current solution (and, in my opinion, should be the best) is that I generate the data in a CSV file and then paste it into the database with the following query:
LOAD DATA LOCAL INFILE 'myfile.csv' INTO TABLE t1 FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY "'"
I use CodeIgniter as a PHP framework, and after the request has completed im, it is redirected to a page with an error that says only
Database error occurred
Error Number: 0
No error message or anything else.
I went through the code, but all I can find is that mysqli_query()returns false, and later mysqli_errno()returns 0 and mysqli_error()returns an empty string.
, , , , CSV . ? , , CodeIgniter mysqli_query() , .
MySQL Workbench, .