title: My this Controller and model works with Codeigniter low version but it's not working with new
body: <p>if I use controller it works fine but if I use CI_Controller it gives this error</p>
  
  <pre><code>Fatal error: Call to undefined method CI_Input::load_query() in C:\wamp\www\films\application\controllers\documents.php on line 124
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>function display($query_id = 0, $sort_by = 'title', $sort_order = 'asc', $offset = 0) {
  
          $limit = 20;
          $data['fields'] = array('FID' =&gt; 'ID', 'title' =&gt; 'Title', 'category' =&gt; 'Category', 'date_added' =&gt; 'date_added', 'department' =&gt; 'department', 'type' =&gt; 'type');
  
          $this -&gt; input -&gt; load_query($query_id);
  
          $query_array = array('title' =&gt; $this -&gt; input -&gt; get('title'), 'category' =&gt; $this -&gt; input -&gt; get('category'), 'date_added_comparison' =&gt; $this -&gt; input -&gt; get('date_added_comparison'), 'date_added' =&gt; $this -&gt; input -&gt; get('date_added'), );
  
          $data['query_id'] = $query_id;
  
          $this -&gt; load -&gt; model('document_m');
  
          $results = $this -&gt; document_m -&gt; search($query_array, $limit, $offset, $sort_by, $sort_order);
  
          $data['documents'] = $results['rows'];
          $data['num_results'] = $results['num_rows'];
  
          // pagination
          $this -&gt; load -&gt; library('pagination');
          $config = array();
          $config['base_url'] = site_url("documents/display/$query_id/$sort_by/$sort_order");
          $config['total_rows'] = $data['num_results'];
          $config['per_page'] = $limit;
          $config['uri_segment'] = 6;
          $this -&gt; pagination -&gt; initialize($config);
          $data['pagination'] = $this -&gt; pagination -&gt; create_links();
  
          $data['sort_by'] = $sort_by;
          $data['sort_order'] = $sort_order;
  
          $data['category_options'] = $this -&gt; document_m -&gt; category_options();
          $this -&gt; load -&gt; view('header');
          $this -&gt; load -&gt; view('document_index.php', $data);
          $this -&gt; load -&gt; view('footer');
      }
  
      function search() {
  
          $query_array = array('title' =&gt; $this -&gt; input -&gt; post('title'), 'category' =&gt; $this -&gt; input -&gt; post('category'), 'date_added_comparison' =&gt; $this -&gt; input -&gt; post('date_added_comparison'), 'date_added' =&gt; $this -&gt; input -&gt; post('date_added'), );
  
          $query_id = $this -&gt; input -&gt; save_query($query_array);
  
          redirect("documents/display/$query_id");
  
      }
  </code></pre>
  
  <p><strong>Model</strong></p>
  
  <pre><code>function search($query_array, $limit, $offset, $sort_by, $sort_order) {
  
          $sort_order = ($sort_order == 'desc') ? 'desc' : 'asc';
          $sort_columns = array('FID', 'title', 'category', 'date_added', 'department', 'type');
          $sort_by = (in_array($sort_by, $sort_columns)) ? $sort_by : 'title';
  
          // results query
          $q = $this-&gt;db-&gt;select('FID, title, category, date_added, department, type')
              -&gt;from('documents')
              -&gt;limit($limit, $offset)
              -&gt;order_by($sort_by, $sort_order);
  
          if (strlen($query_array['title'])) {
              $q-&gt;like('title', $query_array['title']);
          }
          if (strlen($query_array['category'])) {
              $q-&gt;where('category', $query_array['category']);
          }
          if (strlen($query_array['date_added'])) {
              $operators = array('gt' =&gt; '&gt;', 'gte' =&gt; '&gt;=', 'eq' =&gt; '=', 'lte' =&gt; '&lt;=', 'lt' =&gt; '&lt;');
              $operator = $operators[$query_array['date_added_comparison']];
  
              $q-&gt;where("date_added $operator", $query_array['date_added']);
          }
  
          $ret['rows'] = $q-&gt;get()-&gt;result();
  
          // count query
          $q = $this-&gt;db-&gt;select('COUNT(*) as count', FALSE)
              -&gt;from('documents');
  
          if (strlen($query_array['title'])) {
              $q-&gt;like('title', $query_array['title']);
          }
          if (strlen($query_array['category'])) {
              $q-&gt;where('category', $query_array['category']);
          }
          if (strlen($query_array['date_added'])) {
              $operators = array('gt' =&gt; '&gt;', 'gte' =&gt; '&gt;=', 'eq' =&gt; '=', 'lte' =&gt; '&lt;=', 'lt' =&gt; '&lt;');
              $operator = $operators[$query_array['date_added_comparison']];
  
              $q-&gt;where("date_added $operator", $query_array['date_added']);
          }
  
          $tmp = $q-&gt;get()-&gt;result();
  
          $ret['num_rows'] = $tmp[0]-&gt;count;
  
          return $ret;
      }
  
      function category_options() {
  
          $rows = $this-&gt;db-&gt;select('name')
              -&gt;from('category')
              -&gt;get()-&gt;result();
  
          $category_options = array('' =&gt; '');
          foreach ($rows as $row) {
              $category_options[$row-&gt;name] = $row-&gt;name;
          }
  
          return $category_options;
      }
      function get_category(){
          $this-&gt;db-&gt;select()-&gt;from('category');
          $query=$this-&gt;db-&gt;get();
          return $query-&gt;result_array();
      }
  
  }
  </code></pre>
  
  <p><strong>View</strong></p>
  
  <pre><code>&lt;?php echo form_open('documents/search'); ?&gt;
          &lt;table width="" border="0" cellpadding="0" cellspacing="0"&gt;
              &lt;tr&gt;
                  &lt;td&gt;
  
              &lt;?php echo form_input('title', set_value('title'), 'id="title"'); ?&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
  
              &lt;?php echo form_dropdown('category', $category_options, 
                  set_value('category'), 'id="category"'); ?&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
  
  
              &lt;?php echo form_dropdown('date_added_comparison', 
                  array('gt' =&gt; '&gt;', 'gte' =&gt; '&gt;=', 'eq' =&gt; '=', 'lte' =&gt; '&lt;=', 'lt' =&gt; '&lt;') , 
                  set_value('date_added_comparison'), 'id="date_added_comparison"'); ?&gt;
              &lt;td&gt;
              &lt;?php echo form_input('date_added', set_value('date_added'), 'id="date_added"'); ?&gt;
                  &lt;/td&gt;
                  &lt;td valign="top"&gt;
                      &lt;input type="submit" value="search" class="btn"/&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
      &lt;?php echo form_close(); ?&gt;
  
      &lt;div&gt;
          Found &lt;?php echo $num_results; ?&gt; document
      &lt;/div&gt;
  
      &lt;table class="table table-striped"&gt;
          &lt;thead&gt;
              &lt;?php foreach($fields as $field_name =&gt; $field_display): ?&gt;
              &lt;th &lt;?php if ($sort_by == $field_name) echo "class=\"sort_$sort_order\"" ?&gt;&gt;
                  &lt;?php echo anchor("documents/display/$query_id/$field_name/" .
                      (($sort_order == 'asc' &amp;&amp; $sort_by == $field_name) ? 'desc' : 'asc') ,
                      $field_display); ?&gt;
              &lt;/th&gt;
              &lt;?php endforeach; ?&gt;
          &lt;/thead&gt;
  
          &lt;tbody&gt;
              &lt;?php foreach($documents as $row): ?&gt;
              &lt;tr&gt;
                  &lt;?php foreach($fields as $field_name =&gt; $field_display): ?&gt;
                  &lt;td&gt;
                      &lt;?php echo $row-&gt;$field_name; ?&gt;
                  &lt;/td&gt;
                  &lt;?php endforeach; ?&gt;
              &lt;/tr&gt;
              &lt;?php endforeach; ?&gt;            
          &lt;/tbody&gt;
  
      &lt;/table&gt;
  
      &lt;?php if (strlen($pagination)): ?&gt;
      &lt;div&gt;
          Pages: &lt;?php echo $pagination; ?&gt;
      &lt;/div&gt;
      &lt;?php endif; ?&gt;
  
  
  table(documents{FID,title,category,date_added,department,type,active}
  table(category{id,name}
  table(ci_query{id,query_string}
  </code></pre>
  
  <p>this works fine with the codeigniter if I user controller I mean the old version of code igniter but this new one I downloaded it' not working and give the error I have post on up.</p>
  
  <p>regards thanks in advance</p>