In this post we will show you how to join 2 or more then 2 tables with join query in codeigniter. we are using join() method for Normal Join, Join With Condition, Join with multiple tables and Join with specific type Query likeleft, right, inner, outer, right outer, left outer.

JOIN Query In Codeigniter

Hear we are use join() method to join 2 table or more then 2 tables in codeigniter model.

Normal Join Query

Join With Condition Query

Join with multiple tables Query

we need to call join() method for multiple times if we need many joins method in one query.

If you need a specific type of JOIN you can specify it via the third parameter of the function.
Options are : left, right, inner, outer, right outer, left outer

Join with specific type Query like :: left, right, inner, outer, right outer, left outer

You need to call join() method multiple times if you need several joins in one query.

Example – 1
For left join() method

Example – 2
For right join() method