Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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();

	}
Source by wlearnsmart.com #
 
PREVIOUS NEXT
Tagged: #join #query #codeigniter
ADD COMMENT
Topic
Name
2+1 =