title: PHP Codeigniter Call to undefined method CI_DB_sqlsrv_driver::result()
body: <p>I have Connected SQL Server 2014 with CodeIgniter. but when I run a query it gives that error.</p>
  
  <p>This is the code which gives an error.</p>
  
  <pre><code> function index()
    {
      $this-&gt;form_validation-&gt;set_rules('username', 'Username','required');
      $this-&gt;form_validation-&gt;set_rules('password', 'Password','required');
      if($this-&gt;form_validation-&gt;run() == TRUE)
      {
          $username = $_POST['username'];
          $password = $_POST['password'];
          $this-&gt;db-&gt;select('*');
          $this-&gt;db-&gt;from('student');
          $this-&gt;db-&gt;where(array('student_id'=&gt;$username,'password'=&gt;$password));
          $query = $this-&gt;db-&gt;get();
          $data = $this-&gt;db-&gt;result();
          if($data)
          {
            echo "&lt;pre&gt; ";
            print_r($data);
          }
      }
    $this-&gt;login('login');
    }
  }
  </code></pre>
  
  <p>The Error is </p>
  
  <blockquote>
    <p>Fatal error: Call to undefined method CI_DB_sqlsrv_driver::result() in
    D:\Xampp\htdocs\CI_Portal\application\models\my_model.php on line 14</p>
  </blockquote>