I have PHP array with data. Now, i'm using a cycle like this:
$updArray = array(1=>11,2=>12,3=>13);
foreach($updArray as $id=>$value)
{
$query = "UPDATE table1 SET column1='$value' WHERE cart_id = '$id'";
mysql_query($query,$link);
}
I think, if array contains thousands rows, it would be slow. Is there a way to update MySQL table (apply my data from array) without cycle and updating every row?