Answers for "inner join query in codeigniter"

PHP
2

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

	}
Posted by: Guest on July-11-2020
0

inner join codeigniter

$this->db->select('*');    
$this->db->from('table1');
$this->db->join('table2', 'table1.id = table2.id');
$this->db->join('table3', 'table1.id = table3.id');
$query = $this->db->get();
Posted by: Guest on September-21-2021

Browse Popular Code Answers by Language