filmov
tv
Laravel 8 E-commerce | Import CSV to MySQL | Import Excel to MySQL | Import Excel to Database
Показать описание
In Part-227 of the Laravel E-commerce series, we will start learning the process of "Import from Excel" both from MySql Database via PhpMyadmin and from Laravel code itself by making the feature in the admin panel.
Import CSV to MySQL
We can use phpMyAdmin MySQL tool that can handle CSV import in the below steps:
- Prepare the CSV file to have the fields in the same order as the MySQL table fields.
- Update created_at and updated_at date format to YYYY/MM/DD in CSV file
- Go to the phpMyAdmin interface.
- Select the database and table in the left menu.
- Make sure table column names are in the same order as they are in the CSV file.
- Click the import button at the top.
- In Browse, choose the CSV file that you have prepared.
- Type 1 at text field with the wording "Skip this number of queries (for SQL) starting from the first one". It will skip CSV file headings to import into the table.
- Kept all other options as it is
- Click on the Go button at the bottom and you are done.
This video is a part of my Laravel Advance E-commerce Series
Other Popular Stack Developers Series that can help you:-
Follow Stack Developers on Social Media to get updates and resolve your queries
Import CSV to MySQL
We can use phpMyAdmin MySQL tool that can handle CSV import in the below steps:
- Prepare the CSV file to have the fields in the same order as the MySQL table fields.
- Update created_at and updated_at date format to YYYY/MM/DD in CSV file
- Go to the phpMyAdmin interface.
- Select the database and table in the left menu.
- Make sure table column names are in the same order as they are in the CSV file.
- Click the import button at the top.
- In Browse, choose the CSV file that you have prepared.
- Type 1 at text field with the wording "Skip this number of queries (for SQL) starting from the first one". It will skip CSV file headings to import into the table.
- Kept all other options as it is
- Click on the Go button at the bottom and you are done.
This video is a part of my Laravel Advance E-commerce Series
Other Popular Stack Developers Series that can help you:-
Follow Stack Developers on Social Media to get updates and resolve your queries