Timeline for How to update multiple rows of a table in a single query?
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 2, 2017 at 16:08 | vote | accept | Hector Andres Rojas | ||
Jan 2, 2017 at 16:08 | comment | added | tjons | Fantastic! Glad it helped. I'll update my answer; would you be willing to accept and upvote? | |
Jan 2, 2017 at 16:04 | comment | added | Hector Andres Rojas |
It works using the item_id (row ID) instead of the product_id , but changing SET qty=VALUES(qty); for item_id=values(item_id), qty=VALUES(qty), is_in_stock=VALUES(is_in_stock); and it takes less than 1 minute.
|
|
Jan 2, 2017 at 15:49 | review | Suggested edits | |||
Jan 2, 2017 at 15:55 | |||||
Dec 30, 2016 at 2:29 | history | edited | tjons | CC BY-SA 3.0 |
added 576 characters in body
|
Dec 30, 2016 at 2:19 | history | answered | tjons | CC BY-SA 3.0 |