Answer to Question #186592 in Databases | SQL | Oracle | MS Access for mansoor

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


1
Expert's answer
2021-04-28T16:48:47-0400
$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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS