I made a table that holds post and likes and I'm trying to output the of everything in the table but I get the
error: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given on line 18.
$sql3 = "SELECT * FROM post;";
 $result = mysqli_query($conn,$sql3);
 $datas = array();
 if (mysqli_num_rows($result)> 0){
     while($row = mysqli_fetch_assoc($result)){
         $datas[] = $row;
     }
 }
     foreach ($datas as $data){
         echo $data;
     }
I expect the all the information to be outputted, but the actual output is
mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given on line 18.
 
     
    