I am getting a
Notice: Trying to get property 'num_rows' of non-object
I have attached the codes and screenshots below
Help would be highly appreciated..
P.S: The connection is successful
<?php
include 'dbconnect.php';
$sql="SELECT * FROM review";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo "id: " . $row["Titleno"];
}
}
else {
echo "0 results";
}
mysqli_close($conn);
?>