$query = mysql_query(\"UPDATE a SET fruit = \'**apple**\' WHERE id = \'**1**\' \"); $query2 = mysql_query(\"UPDATE a SET fruit = \'**orange**\' WHERE id = \'**2**\'
I found a following solution:
INSERT into `table` (id,fruit) VALUES (1,'apple'), (2,'orange'), (3,'peach') ON DUPLICATE KEY UPDATE fruit = VALUES(fruit);
Id must be unique or primary key. But don't know about performance.