join query with where condition in codeigniter

Today, We want to share with you left join in codeigniter.In this post we will show you join query in codeigniter controller, hear for codeigniter join 3 tables we will give you demo and example for implement.In this post, we will learn about How To Use Joins In CodeIgniter? with an example.

Codeigniter Inner Join With Multiple Tables

$this->db->join('profile_image', 'profile_image.member_id =');
$this->db->join('city', 'city.member_id =','left');
$this->db->join('post', 'post.member_id =','left');
$this->db->join('friends', 'friends.member_id =','left');
$this->db->where('', $id); 
$query = $this->db->get();


Select *from members
join profile_image on profile_image.member_id =
left join city on city.member_id =
left join post on post.member_id =
left join friends on friends.member_id =
where = $id

codeigniter join 2 table data

db->select(', infinityknow.something, mobile.another')
     ->from('table1 as tamilrokers')
     ->where('', $id)
     ->join('table2 as infinityknow', ' =', 'LEFT')
     ->join('table3 as mobile', ' =', 'LEFT')

I hope you get an idea about delete query in codeigniter.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Comment