Codeigniter Right Outer Join Example

This tutorial will show you how we can use Codeigniter’s Query Builder Class to build join queries for fetching data from multiple tables.

The purpose of a join is to combine the data across tables.
A join is actually performed by the where clause which combines the specified rows of tables.
If a join involves in more than two tables then first two tables are joined based on the join condition and then compares the result with the next table and so on.

Here we will see Right Outer Join example. Outer join gives the non-matching records along with matching records. Right Outer Join will display the all matching records and the records which are in right hand side table those that are not in left hand side table.

We will use Codeigniter’s $this->db->join() that permits you to write the JOIN portion of your query.

Read also Codeigniter Full Outer Join Example ,  Codeigniter Left Outer Join Example and Codeigniter Join Example

Continue reading “Codeigniter Right Outer Join Example”