Codeigniter Left Join Query With Where Clause Code Example


Example: left join in codeigniter query builder

$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.lang='.$this->lang, 'left'); $this->db->where('p.id', $this->product_id); $this->db->where_in('info.name', ['good', 'bad']);

Comments

Popular posts from this blog

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?