hello friends i have a code. i found matching of one array value in another array column and updated row with second array value. but i want to update status of first array record in mysql table with zero when no matches found.anybody knows please help. i will provide my code below
foreach ($result as $rel)
{
foreach ($array as $arr)
{
if(strcmp(trim($rel['objId']),trim($arr['BCEID']))==0)
{
$name=$arr['FirstName'];
$conditn=$rel['objId'];
$sql1="UPDATE e_student SET Name = '$name' WHERE objId ='$conditn'";
$result=$conn->query($sql1);
}
}
}