CodeIgniter 4 Query Builder union() and unionAll() methods

UNION and UNION ALL set operators return the combined rows from 1 or more SELECT queries. CodeIgniter 4 Query Builder now supports UNION and UNION ALL queries with the $builder->union() and $builder->unionAll() methods respectively. Learn how to create these types of queries in this article.

This article and many to follow, are part of a series of articles I am writing and sharing as I learn new concepts when I learn them. I think of it as a duty in sharing the things I learn as a self-taught developer. We all need to support one another as we continue to learn and grow. #buildinpublic #learninpublic #indiehackers #developer

(more…)

Create CodeIgniter 4 Models With Command Line Generators

I’m all about saving time wherever I can in coding projects. In CodeIgniter 4, there are some handy commands you can use and save a lot of time setting up base file scaffolding: Command Line Generators (CLG). I recently explored using CLGs for Model scaffolding and was impressed with the time savings.

(more…)

Counting with countAll() and countAllResults() in CodeIgniter 4

Getting a count of table or query rows in CodeIgniter 4 is quite easy using either of the Query Builder countAll() or countAllResults() functions. Continue reading to see examples of each…

(more…)