Question #186592

 

Q1: Write the code in PHP MYSQL to update the salary of the employee where where name is ali and salary is an even number.                                                                                      (4)

CNIC

Name

Salary

Mobile Number


Expert's answer

$sql = "update employee set salary='$value' where name='$name' and '$salary%2==0'";
if(mysqli_query($link, $sql)){
    echo "Records updated successfully.";
} else{
    echo "ERROR: Could not able to execute $sql. " . mysqli_error($link);
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS