Bladephp: Now with 8+ codeigniter, php, and laravel project 8+ php project From $37/Month From Rs. 2499/Month

Left Join Query in Codeigniter

codeigniter mysql
Left Join Query in Codeigniter

The LEFT JOIN is sometimes called as LEFT OUTER JOIN and is performed on two database tables - the first table (on the left side) is referred as LEFT TABLE and and the second (on the right side) one as RIGHT TABLE. The LEFT JOIN returns all the rows from the LEFT TABLE along with the matching rows on the RIGHT TABLE.

Let’s create a left join method in codeigniter

$this->db->join('tbl_user', ' = tbl_order.user_id','left');
$query = $this->db->get();
return $query->result();


Html code work in comment box

Related Post