TypeError thrown

mysqli_num_rows(): Argument #1 ($result) must be of type mysqli_result, bool given