A
A
Alexey Alyushenko2015-11-05 23:05:06
PHP
Alexey Alyushenko, 2015-11-05 23:05:06

How to parse a csv request and enter it into the database?

Hello, I have a csv table with 1000 rows and a mysql table
Compressed example of two csv files and a final table:
58f49bdfdd.png
You need to somehow process the csv data and put the data into a table, but only once for each value.
As I see the solution:
1) Create another table, where to enter data from csv by a unique index, if it is entered, then make a request to update the first table
2) -//-, collect data into a variable and enter everything together with one request

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Max, 2015-11-05
@MaxDukov

discover insert on duplicate key update

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question