title: Count number of returned rows in OOP PHP
body: <p>I am learning OOP PHP with MySQL. I am trying to run a query that should print the number of rows returned. My php code is as below:</p>
  
  <pre><code>$con=  mysqli_connect('localhost','root','','dealinte_cms') or die(mysqli_error());
  $email="joy1@gmail.com";
  if($r=$con-&gt;prepare("SELECT * FROM user WHERE email=? ")){
  $r-&gt;bind_param("s",$email);
      if(!$r-&gt;execute()){
          echo mysqli_errno($con);
      }
      else{
          $rowCount=$r-&gt;num_rows;
          echo $rowCount;
      }
  }
  </code></pre>
  
  <p>In my database that email is in 4 rows, So <strong>it should print 4, but it shows 0</strong></p>
  
  <p>Whats wrong with my code?</p>