title: Fatal error: Call to undefined method mysqli::num_rows()
body: <p>Hi I am requesting help with my PHP. I checked the code through and I couldn't spot any errors in it.</p>
  
  <p>I'm not that great with PHP, and I hope any of you could help.</p>
  
  <p>It should return either false or true but, I get this error</p>
  
  <p><code>Fatal error: Call to undefined method mysqli::num_rows()</code></p>
  
  <p>Here is my code:</p>
  
  <p><code>$mysqli</code> is my mysqli database connector.</p>
  
  <pre><code>$email = $_SESSION["email"];
  
  function isbanned($email){
      global $mysqli;
      if($mysqli-&gt;num_rows("SELECT * FROM `user_bans` WHERE `banned_id` = '".$email."' LIMIT 1") &gt; 0){
          return true;
      }
      return false;
  }
  
  isbanned($email);
  </code></pre>
  
  <p>That's all my code for the banned script.</p>
  
  <p>Thanks in advance.</p>