title: CodeIgniter Model Not Found
body: <p>I am trying to connect mysql with CodeIgniter. I got this error:</p>
  
  <pre><code>load-&gt;database(); 
  $query = $this-&gt;db-&gt;get('student'); return $query-&gt;result(); } } ?&gt;
  
  Fatal error: Class 'Student_model' not found in 
  C:\wamp\www\CodeIgniter\system\core\Loader.php on line 303
  </code></pre>
  
  <p>Here is my code:</p>
  
  <p><strong>MODEL</strong></p>
  
  <pre><code>class Student_model extends CI_Model
  {
  
      function __Construct()
  
      {
          parent::__Construct();
      }
  
      public function student_getall()
      {
          $this-&gt;load-&gt;database();
          $query = $this-&gt;db-&gt;get('student');
          return $query-&gt;result();
      }
  }
  </code></pre>
  
  <p><strong>VIEW</strong></p>
  
  <pre><code>foreach($query as $row)
  {
      print $row-&gt;fname;
      print $row-&gt;lname;
      print $row-&gt;roll;
      print $row-&gt;address;
      print "&lt;br&gt;";
  }
  </code></pre>
  
  <p><strong>CONTROLLER</strong></p>
  
  <pre><code>class Student extends CI_Controller
  {
      function __Construct()
      {
          parent::__Construct();
      }
  
      public function getall()
      {
          $this-&gt;load-&gt;model('student_model');
          $data['query'] = $this-&gt;student_model-&gt;student_getall();
          $this-&gt;load-&gt;view('student_view',$data);
      }
  }
  </code></pre>