I want to update the column value(slot time) present in "schedule" table to zero time as the slot time is inserted to another table "appointment" so that the booked slot times will be set to unavailable in "schedule" tabel
<?php
$docid = $_SESSION['did'];
$date = $_SESSION['dt'];
$slot = $_SESSION['st'];
/*echo$docid;
echo$date;*/
$sql1 = "SELECT * FROM `appointment`;";
$sql2 = "SELECT * FROM `schedule`;";
$result1 = mysqli_query($conn,$sql1);
$result2 = mysqli_query($conn,$sql2);
while($rows1 = mysqli_fetch_assoc($result1)){
if($rows1['docid']=$docid && $rows1['date']=$date){
echo $docid;
echo $date;
echo $slot;
echo "match";
while ($rows2 = mysqli_fetch_assoc($result2)) {
for ($i=3; $i <10 ; $i++) {
if ($rows2[$i]=$slot){
echo $rows2[$i];
$sql = "UPDATE `schedule` SET ________='00:00:00';"
mysqli_query($conn,$sql);
echo $i;
break;
}
}break;
}
}
break;
}