Answers for "where in in codeigniter 3 with join query"

PHP
2

how to use join query in codeigniter

public function getdata(){	

	$this->db->select('*');
	$this->db->from('table1'); // this is first table name
	$this->db->join('table2', 'table2.id = table1.id'); // this is second table name with both table ids
	$query = $this->db->get();
	return $query->result();

	}
Posted by: Guest on July-11-2020
0

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']);
Posted by: Guest on March-07-2021

Code answers related to "where in in codeigniter 3 with join query"

Browse Popular Code Answers by Language