Trying to execute following PHP code, however just first statement gets executed successfully and rest following don't.
<?php
$link = mysqli_connect('localhost', 'root', '');
mysqli_select_db($link, 'database_name');
$update = " UPDATE `temp` SET `price` = 1000 WHERE `id` = 1;
UPDATE `temp` SET `price` = 2000 WHERE `id` = 2;
UPDATE `temp` SET `price` = 3000 WHERE `id` = 3;
UPDATE `temp` SET `price` = 4000 WHERE `id` = 4;
UPDATE `temp` SET `price` = 5000 WHERE `id` = 5;";
mysqli_multi_query($link, $update);
$update2 = "UPDATE `temp` SET `price` = 6000 WHERE `id` = 6;
UPDATE `temp` SET `price` = 7000 WHERE `id` = 7;
UPDATE `temp` SET `price` = 8000 WHERE `id` = 8;
UPDATE `temp` SET `price` = 9000 WHERE `id` = 9;
UPDATE `temp` SET `price` = 10000 WHERE `id` = 10;";
mysqli_multi_query($link, $update2);
?>
mysqli_multi_query($link, $update); - Executed Successfully
mysqli_multi_query($link, $update2); - Not Executed.
Could anybody guide, if I might be missing something, or regarding the syntax.