Home >Backend Development >PHP Tutorial >How to insert a bunch of data into the database in batches?
To make test data, I found a bunch of names and IPs from the Internet. How should I store them in the database? !
To make test data, I found a bunch of names and IPs from the Internet. How should I store them in the database? !
I will give you a rough idea:
1. Use PHP’s file processing function to read the file line by line and get a large array
2. Use a foreach loop to insert mysql and it will be OK