Answer the question
In order to leave comments, you need to log in
How to properly update records in a MySQL table based on data from an array?
Hello friends.
There is a question about the optimal algorithm for updating data in an existing MySQL table of goods from an array. The array is taken from a third-party resource in which both the cost, quantity, and other characteristics of an existing product change, as well as new products can be added. The number of records so far is about 1000 pieces. - a little, but maybe a lot more over time.
How to optimally solve this problem with the prospect of increasing the number of records in the table?
Answer the question
In order to leave comments, you need to log in
Loop through the array and update. There is an updateAll method, sometimes justified. Everything depends on the situation. It's not entirely clear what the problem is? You don't know how? Or don't know which option to choose? If the latter, please provide alternatives.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question