I\'m new to building databases and I\'m trying to do a JOIN based on a having three database tables.
Table A = ID, Name, etc
Table B = ID, Name, etc
Table C
$this->db->select('*');
$this->db->from('table1');
$this->db->join('table2','table1.id=table2.id');
$this->db->join('table3','table2.id=table3.id');
$this->db->join('table4','table3.id=table4.id');
$this->db->join('table5','table5.id=table4.id');
$this->db->where('table5.id',$this->session->userdata('id'));//getting value from session and match the id of table5 and then show data
$data=$this->db->get()->result();//all data store in $data variable