Join Query in Codeigniter

This tutorial will help you to learn join query using php codeigniter. Table joins are essential part in application development while displaying the records from multiple tables.

Let’s create a join method in codeigniter

$this->db->select('tbl_order.*,tbl_user.fullname');
$this->db->from('tbl_order');
$this->db->join('tbl_user', 'tbl_user.id = tbl_order.user_id');
$query = $this->db->get();
return $query->result();

Related Posts