title: Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result,,
body: <p>Hello I am trying to look after content of Selected query... but however the error appears:</p>
  
  <blockquote>
    <p>Warning : mysqli_num_rows() expects parameter 1 to be mysqli_result,
    bool given in C:\xampp\htdocs\e-catalog\index.php on line 30</p>
  </blockquote>
  
  <pre><code>&lt;div class="row"&gt;
  
  &lt;?PHP
  
  $con = mysqli_connect('localhost','root', '');
  mysqli_select_db($con,'ecatalog');
  
  
  $query = " SELECT `name`, `image`, `price`, `discount` FROM `eproduct` order by id ASC ";
  
  $queryfire = mysqli_query($con, $query);
  
  $num = mysqli_num_rows($queryfire);
  
  if($num &gt; 0){
      while($product = mysqli_fetch_array($queryfire)){
          ?&gt;
  
      &lt;div class="col-lg-3 col-md-3 col-sm-12"&gt;
  
          &lt;form&gt;
              &lt;div class="card"&gt;
                  &lt;h6 class="card-title bg-info text-white p-2 text-uppercase"&gt; &lt;?php echo
                   $product['name'];  ?&gt;   &lt;/h6&gt;
  
                  &lt;div class="card-body"&gt;
                       &lt;img src="&lt;?php echo
                   $product['image'];  ?&gt;" alt="phone" class="img-fluid mb-2" &gt;
  
                   &lt;h6&gt; &amp;#8377; &lt;?php echo $product['price'];  ?&gt;&lt;span&gt; (&lt;?php echo $product['discount'];  ?&gt;% off) &lt;/span&gt; &lt;/h6&gt; 
  
                   &lt;h6 class="badge badge-success"&gt; 4.4 &lt;i class="fa fa-star"&gt; &lt;/i&gt; &lt;/h6&gt;
  
                   &lt;input type="text" name="" class="form-control" placeholder="Quantity"&gt;
  
                  &lt;/div&gt;
                  &lt;div class="btn-group d-flex"&gt;
                      &lt;button class="btn btn-success flex-fill"&gt; Add to cart &lt;/button&gt; &lt;button class="btn btn-warning flex-fill text-white"&gt; BUy Now &lt;/button&gt;
                  &lt;/div&gt;
  
  
              &lt;/div&gt;
          &lt;/form&gt;
  
      &lt;/div&gt;
  
  
  &lt;?php       
      }
  }
  ?&gt;
  </code></pre>
  
  <p></p>