title: Codeigniter Inner join query not working
body: <p>I've written the following Inner joing query that works perfectly.</p>
  
  <pre><code>$query = $this-&gt;db-&gt;query('SELECT * FROM StockMain INNER JOIN StockDetail ON StockMain.vrnoa = StockDetail.vrnoa WHERE StockMain.vrnoa = ' . $vrnoa);
  </code></pre>
  
  <p>Then I thought to transform it to the following:</p>
  
  <pre><code>$query = $this-&gt;db-&gt;select('StockMain.*, StockDetail.*')
                -&gt;from('StockMain')
                -&gt;join('StockDetail', 'StockMain.vrnoa = StockDetail.vrnoa', 'inner')
                -&gt;where('StockMain.vrnoa', $vrnoa);
                -&gt;db-&gt;get();
  </code></pre>
  
  <p>But due to some strange reason it isn't working. Can anyone please tell me what I am doing wrong here. Why does this second query not work as both are the same?</p>