Codeigniter3 / model / join query?
Join query ?
-
Note
inner join
left join$this->db->select('*'); $this->db->from('orders'); $this->db->join('users', 'users.id = orders.user_id'); $query = $this->db->get(); $result= $query->result(); note the third parameter in the join() function
$this->db->select('*'); $this->db->from('orders'); $this->db->join('users', 'users.id = orders.user_id' ,'left' ); $query = $this->db->get(); $result= $query->result();
MANVIA BLOG