i am workin on system that get some data from xml file & insert them into mysql database.
number of records in every xml files are over 200 & i cant INSERT & UPDATE them one by one.(because make the page operation very slow).
for insertin data i dont have problem, but for updating data i dont know how to handle the operation in all cases.
for example in case that updating field is similar i used this conversion:
Code:
UPDATE table1 SET del='Yes' WHERE id=101;
UPDATE table1 SET del='Yes' WHERE id=102;
UPDATE table1 SET del='Yes' WHERE id=103;
==>
UPDATE table1 SET del='Yes' WHERE id=101 OR id=102 OR id=103;
but in this case i dont have any idea:
Code:
UPDATE table1 SET serial_num='AB101' WHERE id=101;
UPDATE table1 SET serial_num='AB102' WHERE id=102;
UPDATE table1 SET serial_num='AB103' WHERE id=103;
how can convert these queries to 1 query: