Skip to content

PHP code snippet – How to use join query inigniter?

public function getdata(){	

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

See also  Python code snippet - How to fill an array with consecutive numbers?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.