Here is the code. When I execute it it shows the error message "Catchable fatal error: Object of class mysqli_result could not be converted to string" Please help me to solve this problem.
$sql = "SELECT dname FROM bdonor WHERE DID = 2";
$dname = $con->query($sql);
echo $dname;