I made a script that auto creates Update statement using For loops and all and the final result executes this:
mysql_query("UPDATE table2
SET(code2='sfvv' WHERE number='1'),
(code2='sdvsdv' WHERE number='2')
WHERE id='32'") or die ( mysql_error() );
The error said: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(code2='sfvv' WHERE number='1'),(code2='sdvsdv' WHERE number='2') WHERE i' at line 1