title: Can I add an IF condition in between query builders of codeigniter
body: <p>I don't know what they are exactly called but I call the query builders 
  <code>$this-&gt;db-&gt;select()</code>.</p>
  
  <p>Is it possible to do this:</p>
  
  <pre><code>$this-&gt;db-&gt;select('*')
           -&gt;from('table_name')
           if(1)
           {
            -&gt;where('column_name',1)
           }
           -&gt;order_by('column_name','ASC');
  </code></pre>
  
  <p>If not are there any alternatives I can do?</p>
  
  <p>Note: I just want to make my code short and not create another function where the only difference is that there is a <code>where()</code> in the function.</p>