Tuesday, 28 October 2014

Left Join in Codeigniter

Syntax

$this->db->join('','','left');

Example

$this->db->select('*');
$this->db->from('blogs');
$this->db->join('comments', 'comments.id = blogs.id', 'left');


Produce 

SELECT * FROM blogs
LEFT JOIN comments ON comments.id = blogs.id



By Naim Najrim Zakaria



0 comments:

Post a Comment