Csv importer to MySQL

Please suggest the best php script to import csv into MySQL.

Do you want to do this often, or just occasionally as an admin? For the latter, you could handle it in phpmyAdmin or probably one of the other admin consoles. Does the CSV file layout change, or will it always be the same? If the latter, you may be best off just writing a short routine to handle it rather than trying to shoe-horn foreign code into your existing software.

Use the PHP League CSV tool to read the file and PDO to update the database.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.