title: Codeigniter database query to compare two values
body: <p>I want to compare two values in where condition by codeigniter query.</p>
  
  <p>Please help me as soon is possible.</p>
  
  <pre><code>&lt;?php
  $This-&gt;db-&gt;select('$a');
  
  $This-&gt;db-&gt;where('a',$a and 'b','$b');
  
  $This-&gt;db-&gt;from('tab');
  
  $get = $this-&gt;db-&gt;get();
  
  ?&gt;
  </code></pre>