title: Codeigniter SQL query no records in other table
body: <p>I would like to join 2 tables but there is no record in the other table. </p>
  
  <p>For example <br>
  Table name: shop_items <br></p>
  
  <ul>
  <li>shop_item_id</li>
  <li>shop_item_sk</li>
  <li>shop_item_name <br></li>
  </ul>
  
  <p>Table name: item_reviews</p>
  
  <ul>
  <li>item_review_id</li>
  <li>item_review_sk</li>
  <li>item_review_desc</li>
  <li>item_review_rate</li>
  <li>shop_item_sk</li>
  <li>item_review_by</li>
  </ul>
  
  <p>The problem is that it the item details doesn't appear when it don't have any record in the item_reviews table <br></p>
  
  <p>this is my SQL statement <br></p>
  
  <pre><code>    $query = $this-&gt;db-&gt;select('*')
      -&gt;from('shop_items')
      -&gt;join('item_reviews', 'shop_items.shop_item_sk=item_reviews.shop_item_sk','inner')
      -&gt;where('shop_items.shop_item_sk',$id)
      -&gt;limit(1)
      -&gt;get();
      return $query-&gt;result();
  </code></pre>
  
  <p>I researched about UNION but I don't know how to use it in Codeigniter.
  Advance thank you for those who can help me.</p>