title: Checking if email exists in the database?
body: <p>I have this function or method in my class, but it doesn't return number of rows when I insert an email into it. I have tested the mysql connection etc, they all are working. Also note that the email that I am passing through the method already exist in database. my plan is to get the number of the rows and if it is bigger than zero, it means we already have this email in database.</p>
  
  <pre><code>public function userExist($email) {
      $query = "SELECT email FROM " . USER_TABLE . " WHERE email = ?";
  
      $stmt = $this-&gt;_db-&gt;prepare($query);
  
      $stmt-&gt;bind_param("s", $email);
  
      if ($stmt-&gt;execute()) {
          $stmt-&gt;store_result();
          return $stmt-&gt;num_rows;
      }
          return false;
  
  
  }
  </code></pre>