title: Call to a member function result() using CodeIgniter
body: <p>I am having a strange issue with mysql and codeigniter. I am getting the following error message:</p>
  
  <pre><code>Fatal error: Call to a member function result() on a non-object in
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>class Event extends Client_Controller
  {
      function __construct()
      {
          parent::__construct();
          $this-&gt;load-&gt;model('Event_Model', '', TRUE);
      }
  
      function pending()
      {
          $data['query'] = $this-&gt;Event_Model-&gt;get_events_list("pending");
          $this-&gt;load-&gt;view('event/pending', $data);
      }   
  
  }
  </code></pre>
  
  <p>Model:</p>
  
  <pre><code>class Event_Model extends Client_Model
  {
      function __construct()
      {
          parent::__construct();
      }
  
      function get_events_list($event_status = '')
      {
          $query = $this-&gt;db-&gt;query("SELECT * FROM tbl_events WHERE event_status= ? ORDER BY event_id DESC", array($event_status));
  
          return $query-&gt;result();// Error is on this line
      }
  }
  </code></pre>
  
  <p>Autoload:</p>
  
  <pre><code>$autoload['libraries'] = array('database', 'session');
  </code></pre>
  
  <p>Any help is appreciated. I have some doubts that my mysql might time-out?</p>