Skip to content

Using PHP. Parse a CSV file, make an attempt at the column type and max length, and INSERT a MySQL table.

License

Notifications You must be signed in to change notification settings

likel/csv-to-mysql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

csv-to-mysql

Using PHP. Parse a CSV file, make an attempt at the column type and max length, and INSERT a MySQL table.

Usage

Through the CLI

$ php src/csv_to_mysql.php [options]

options:
  -f, --csvfile            The path the CSV file you wish to insert
  -h, --dbhost             Database host
  -u, --dbusername         Database username
  -p, --dbpassword         Database password
  -d, --dbname             Database name
  -t, --mysqltablename     The table name for the newly inserted table
  -i, --help               Display these help commands

Running from HTTP

Set the $OPTIONS values in the csv_to_mysql.php script and run it from your browser.

Author

Liam Kelly - likel

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Using PHP. Parse a CSV file, make an attempt at the column type and max length, and INSERT a MySQL table.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages