query($sql); if ($ r){ echo "The error is that the data has been updated here. If this ai"/> query($sql); if ($ r){ echo "The error is that the data has been updated here. If this ai">
Home >Backend Development >PHP Tutorial >php mysql php mysql How to determine whether it has been updated after update
First of all, my suggestion is to get over it if you encounter a problem. Read the PHP manual 1001 times and the problem will be solved.
I searched on Baidu, and netizens gave me a variety of answers.
First correct a wrong method from Baidu:
Copy the code The code is as follows:
$sql = "update table a set aname='name' where aid=88";
$r = $conn ->query($sql);
if ($r){
echo "The error is that the data has been updated here. If the data with aid of 88 does not exist, the statement will also return true.";
}
The above introduces the method of php mysql php mysql to determine whether it has been updated after update, including the content of php mysql. I hope it will be helpful to friends who are interested in PHP tutorials.