Hi so I am using a mysqli multi query for the first time. I have tried this query in phpmyadmin and it works but when running this query I get the error below.
if(isset($_GET['del'])){
$delete_id = $_GET['del'];
$delete_query = "DELETE FROM `gallerycontent` WHERE `pic_id` = '$delete_id';";
$delete_query. = "SET @num = 0;";
$delete_query. = "UPDATE `gallerycontent` SET `pic_id` = @num := (@num+1);";
$delete_query. = "ALTER TABLE `gallerycontent` AUTO_INCREMENT =1;";
if(mysqli_multi_query($link, $delete_query)){
echo "<script>alert('The image has been deleted')</script>";
echo "<script>window.open('reviewgallery.php','_self')</script>";
}
}
Here is the error I get
Parse error: syntax error, unexpected '=' in C:\wamp\www\mysqli\deleteimage.php on line 13
which is the line
$delete_query. = "SET @num = 0;";
Also does it for the other vars.
Not sure what the answer and I have not been able to find much help on this one. Thanks for your help in advance.