title: CodeIgniter PDO - Call to undefined method CI_DB_pdo_mysql_driver::num_rows()
body: <p>I'm trying to code a web login/registration system and I'm getting the following error:</p>
  
  <p><code>Fatal error: Call to undefined method CI_DB_pdo_mysql_driver::num_rows() in (path to model) on line 7</code></p>
  
  <p>I tried also using rowCount() instead and it still didn't work.</p>
  
  <p>That's the model:</p>
  
  <pre><code>&lt;?php
  
  class Member_model extends CI_Model {
      public function can_log_in() {
          $query = $this-&gt;db-&gt;select('password')-&gt;where('email', $this-&gt;input-&gt;post('email'));
  
          if ($query-&gt;num_rows() == 1) {
              if (password_verify($this-&gt;input-&gt;post('password'), $query-&gt;row(1))) {
                  return TRUE;
              }
          } else {
              return FALSE;
          }
      }
  }
  </code></pre>
  
  <p>This model is linked to the login controller which uses the can_log_in function to validate credentials with verification rules (callback_validate_credentials) and return a validation set_message() if false.</p>