mysqli_num_rows() expects parameter 1 to be mysqli_result in php code example

Example: 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)){
                             



                          ?>

Tags:

Php Example