The CodeIgniter 4 Query Builder class provides ORM-like functionality for Database operations in the framework. As developers, we know SQL JOINs are foundational and oftentimes required in order to retrieve the correct data. The Query Builder class has a dedicated join() method you can use when constructing queries where JOINs are necessary. Continue reading and learn how to use the CodeIgniter 4 Query Builder join() method…
(more…)CodeIgniter
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…)CodeIgniter 4 Query Helper getLastQuery() method – MySQL Prototyping
I’m resharing a post I first published over on my Medium account for interested readers here. As you know, SQL is my passion and sweet spot. But, I also have an affinity for PHP and CodeIgniter. Continue reading and learn how I prototype Query Builder patterns in CodeIgniter 4…
(more…)OpenLamp.tech #7 – MySQL Metadata with CodeIgniter 4
After taking the week of Christmas off, OpenLamp.tech – the newsletter for PHP/MySQL developers – is back with a massive issue for you this week to close out the month and the year. In this issue, we are covering MySQL metadata in CodeIgniter 4. Continue reading for more information…
(more…)CodeIgniter 4 Query Builder set() function with update()
CodeIgniter 4 Query Builder class has an update() function used to process UPDATE Data Manipulation Language (DML) commands. Using update() as a standalone function call is perfectly valid. However, there is also a set() function used for setting column values as you would with the SET keyword in an SQL UPDATE statement. Used in conjunction with the Query Builder where() function, you can easily UPDATE column values for an individual row or multiple rows. Continue reading for more information…
(more…)