title: Where clause in Codeigniter Query Builder Class
body: <p>I got in trouble trying to get data from two MySQl table.
  In the first table I stored image filename; in the second table I stored info about each image; info are in two languages, en and it. Of course not all images in first table have info in the second one.
  I'm trying to get images an info for a selected language in the following way:</p>
  
  <pre><code>$this-&gt;db-&gt;select ('
              tbl_images.image,
              tbl_infos.info
              ');
  
  $this-&gt;db-&gt;from('tbl_images');
  $this-&gt;db-&gt;join('tbl_infos', 'tbl_images.id = tbl_infos.id', 'left');
  $this-&gt;db-&gt;where('tbl_images.id', $id);
  $this-&gt;db-&gt;where('tbl_infos.lang', 'en');
  </code></pre>
  
  <p>Now...if the tbl_infos table has text, the query return correct data, but if no info are stored I get an error since no images are retrieved; if I remove the lang where clause I get the iamge if no info are stored...but I get images with info twice!!</p>
  
  <p>I'm getting crazy and completely stuck on this...how can I fix this?
  Thanks a lot</p>