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 }