Anda dapat menggunakan mysqli.affected-rows .
Pertimbangkan hal berikut:
$query="delete from exam where eid='$eid'";
if ($con->query($query)==TRUE && $con->affected_rows > 0) {
echo " record deleted";
} else {
echo "Error: " . $query . "<br>" . $con->error;
}