title: codeigniter how to set where condition in this query and join to my secound table
body: <p>this my query</p>
  
  <p>in this query...i want to join tow table(table1, table2) as the secound query</p>
  
  <p><strong>first query</strong></p>
  
  <pre><code> $q = $this-&gt;db-&gt;select('*')
               -&gt;from('table')
               -&gt;limit($limit, $offset)
               -&gt;order_by($sort_by, $sort_order);
  </code></pre>
  
  <p>i want on above query such down works but is it posible in above one..when not changing the layout of the query....?</p>
  
  <p><strong>secound query</strong> this one join works fine i want first query just to do same as secound query</p>
  
  <pre><code> $this-&gt;db-&gt;select('*');
              $this-&gt;db-&gt;from('table1');
              $this-&gt;db-&gt;join('table2', 'table1.t_id', 'table2.id');
              $this-&gt;db-&gt;limit(9);
              return $this-&gt;db-&gt;get()-&gt;result();
  </code></pre>