This question already has an answer here:
- mysqli_affected_rows in PHP insert 3 answers
The following is my query:
$sql = "UPDATE `tbl_override_marks` SET final_mark ='$mark', confirmed ='Y'
WHERE fk_class_sub_id ='$cls_sub'";
When I give:
$result = $conn->query($sql);
echo $result->num_rows;
It gives me trying to get property of non-object in address but the database is updated. Can someone please tell me where I'm going wrong and how to find number of affected rows?
</div>