how to use join query in codeigniter

Solutions on MaxInterview for how to use join query in codeigniter by the best coders in the world

showing results for - "how to use join query in codeigniter"
Maya
08 Sep 2020
1public function getdata(){	
2
3	$this->db->select('*');
4	$this->db->from('table1'); // this is first table name
5	$this->db->join('table2', 'table2.id = table1.id'); // this is second table name with both table ids
6	$query = $this->db->get();
7	return $query->result();
8
9	}