Member-only story

OpenLampTech issue #15 — CodeIgniter 4 Query Builder select() methods in depth

Josh Otwell
9 min readFeb 25, 2022

--

This month’s featured piece looks at CodeIgniter 4 Query Builder select methods. There is also curated content on PHP frameworks comparison, the htaccess file, PHP benchmarks, and much more.

Hey glad to have you here! 👍

If someone shared this newsletter with you and you are not yet subscribed, please Subscribe below:

Thank you for reading OpenLampTech! Subscribe (it’s free) and receive new posts by email, be part of a great community, and support my work.

Select data with CodeIgniter 4 Query Builder methods

We can’t much use database data in any reporting output or displays without selecting it from the tables.

The CodeIgniter 4 Query Builder class has specific select() methods that make querying the data a breeze. I'm focusing on just those select-like methods in this month's OpenLampTech featured piece...

For the example select() queries, I am using the Sakila database 'store' table with this data:

I also have this $builder connection instance used throughout the examples and will be logging the queries sent to the server using the $db->getLastQuery() method:

--

--

Josh Otwell
Josh Otwell

Written by Josh Otwell

SQL/PHP | Photography | Technical Consultant. Sign-up for my free developer newsletter, OpenLampTech, here: openlamptech.substack.com

No responses yet