title: Empty result in Codeigniter
body: <p>I want to get query result from my model and use it in view. I don't know why but my result is empty. Can you look at this and tell me what I'm doing wrong?</p>
  
  <p>Controller: </p>
  
  <pre><code>    $peugeot = $this-&gt;input-&gt;post('peugeot');
      $citroen = $this-&gt;input-&gt;post('Citroen C-Elysee');
      $nissan= $this-&gt;input-&gt;post('Nissan Evalia');
      $renault = $this-&gt;input-&gt;post('Renault Trafic 9-os');
      $this-&gt;load-&gt;model('Edit_model');
      $this-&gt;Edit_model-&gt;peugeot($peugeot);
      if($peugeot)
      {
          $result = $this-&gt;Edit_model-&gt;peugeot($peugeot);
          $data['result'] = $result;
      }
  </code></pre>
  
  <p>Model: </p>
  
  <pre><code>    public function peugeot($peugeot)
      {
          $this-&gt;db-&gt;like('model', $peugeot, 'after'); 
          $query = $this-&gt;db-&gt;get('cars');
          $result = $query-&gt;result();
          return $result;
      }
  </code></pre>
  
  <p>View:</p>
  
  <pre><code>if($peugeot)
  {
      print_r($result);
  }
  </code></pre>