if ($result-> num_rows > 0) {
while($row = $result->fetch_assoc()) {
code here..}`
Above is my php code, but always server saying below error.
Trying to get property 'num_rows' of non-object in...
if ($result-> num_rows > 0) {
while($row = $result->fetch_assoc()) {
code here..}`
Above is my php code, but always server saying below error.
Trying to get property 'num_rows' of non-object in...
Try This >
$result = $conn->query($sql);
if($result){
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
code here..}`
}