Results 1 to 5 of 5
Dec 15, 2012, 17:54 #1
- Join Date
- Jul 2007
- 0 Post(s)
- 0 Thread(s)
PHP/MySQL - Bulk Update in a single query?
I have a script that allows members to import/export up to 10,000 products. I was able to build a script to bulk import 10,000 products with a SINGLE MySQL insert statement by building an array instead of looping through 10,000 insert queries.
When members export the files, they are given the id of each item already listed. So they can edit their item descriptions, prices and 20 different columns, and re-import them. To do this, I need to use the MySQL UPDATE. The problem is I have to loop through 10,000 items and do 10,000 Update queries. I'm not sure how to get it into a single Update function
Is there a way to do build up the updates into an array and Update all of the listings in a single query?