CodeIgniter Inner Join Query: Inner Join picks up the rows from both the tables using common column data. In other words it takes up the cross product of two (or more) tables and selects all rows that contain matching values in their common field. Inner join is also called as simple join and has several variations to it. In this post, we'll see about forming inner join query in codeigniter with proper example. Since Codeigniter is an MVC one should follow a specific pattern in query formation.
CodeIgniter Inner Join Query:
Codeigniter has a library called Active Record Class for building database queries. Although the framework accepts plain old sql queries, it’s a good practice to stick on to the MVC standards and keep the application database independent. Let's see how to write codeigniter join queries with some examples.