May be you have some idea how I can escape `$this->lang'. This is my actual query:
$this->db->select('p.id, p.photo, p.desc, info.desc');
$this->db->from('products as p');
$this->db->join('lang_info as info', 'info.id=p.id and info.name=\'good\' info.lang='.$this->lang, 'left');
$this->db->join('lang_info as info2', 'info2.id=p.id and and info2.name=\'bad\' info2.lang='.$this->lang, 'left');
$this->db->where('p.id', $this->product_id);
I can't use where clause because I get less output rows:
$this->db->where('info.lang', $this->lang);
$this->db->where('info2.lang', $this->lang);
I need something like $this->db->join_on('info.lang', $this->lang); but in codeigniter I can't find something like this