multiple queries in model file codeigniter
<p>I have a site based on the PHP framework, CodeIgniter. I am facing a problem while fetching data from the database table <code>travels_detail</code> on a page.  </p>

<p>The controller method:  </p>

<pre><code>function search_travel(){
    $departure= $this-&gt;input-&gt;post('departure');
    $destination= $this-&gt;input-&gt;post('destination'); 
    $data['var']= $this-&gt;Travel-&gt;search_travel($departure, $destination);
    $this-&gt;load-&gt;view('flight-list',$data);
}
</code></pre>

<p>And the model method:  </p>

<pre><code>function search_travel($departure, $destination){
    $this-&gt;db-&gt;select()-&gt;from('travels_detail')-&gt;where('departure', $departure)-&gt;where('destination', $destination);
    $query= $this-&gt;db-&gt;get();
    return $query-&gt;result_array();      
} 
</code></pre>

<p>The problem is, I want to execute another query and want to get some data from another table in the same page.  </p>

<p>For instance, I'm getting data from <code>travels_detail</code> table of <code>airline: arik</code> and I want to get the image of <code>arik</code> airline from <code>airlines</code> table.  </p>

<p>The query should be:  </p>

<pre><code>select image from airline where airline = '$airline'
</code></pre>

<p>How do I do this in CodeIgniter?</p>