On my latest work/project, with CodeIgniter, I need to use subqueries – a select inside another select.
This is a subquery library for CodeIgniter’s active record class. It lets you use active record methods to create subqueries in SQL queries. It supports SELECT, JOIN, FROM (and other statements, I guess). It also supports subqueries inside subqueries.
From: https://github.com/EllisLab/CodeIgniter/wiki/Subqueries
For that I had to download a subquery library for CodeIgniter’s available where
https://github.com/NTICompass/CodeIgniter-Subqueries.