Objectif: update multiple rows in mysql
Quick Solution (for example):
UPDATE my_table SET my_field=first_value WHERE id=1; UPDATE my_table SET my_field=second_value WHERE id=2; UPDATE my_table SET my_field=third_value WHERE id=3; ...
Problem : performance
Other solution with function FIND_IN_SET() :
UPDATE `my_table` SET my_field = find_in_set(id, 'first_value, second_value, third_value, ...') WHERE id IN (1, 2, 3, 4, ...)
Find more explaination :
http://www.w3resource.com/mysql/string-functions/mysql-find_in_set-function.php