mysqli_num_rows() expects parameter 1 code example

Example 1: Warning: mysqli_error() expects exactly 1 parameter, 0

Change

die (mysqli_error()); 
to

die('Error: ' . mysqli_error($myConnection));
in the query

$query = mysqli_query($myConnection, $sqlCommand) or die (mysqli_error());

Example 2: Warning : mysqli_num_rows() expects parameter 1 to be mysqli_result, bool given in

<?php
                 
                 include("db.php"); 

                 
              
$search = $_POST['search'];
echo $search;
                            
                           

$sql = "SELECT * FROM `products` WHERE CONCAT(`pro_title`, `pro_sub_title`, `pro_keyword`, `pro_price`, `pro_cutprice`, `pro_stock`, `pro_Feature1`, `pro_Feature2`, `pro_Feature3`, `pro_Feature4`, `pro_Feature5`, `Product_des`, `pro_img1`, `pro_img2`, `pro_img3`, `pro_img4`, `pro_num`, `whom`, `size`, `kids_size`, `color`, `size_m`, `material`, `brend`) LIKE '%".$search."%'";


                            $result = mysqli_query($con, $sql);
                            if(mysqli_num_rows($result)){
                              while($row = mysqli_fetch_assoc($result)){
                             



                          ?>