OpenLampTech issue #55
Flatten arrays in PHP | ACF and WP Query Loop block | MySQL LATERAL JOIN | Improve PHP-based development. Thank you so much for reading OpenLampTech!!!
I’m so glad to have you here reading OpenLampTech! 👍
Thank you!!!
If someone awesome shared this newsletter with you and you are not yet subscribed, please use the Subscribe button below and join:
December is going to be a busy month for the OpenLampTech developer newsletter. I have a couple of fantastic developer interviews lined up for you in addition to my high-level overview of the database enhancements and improvements to CodeIgniter 4 over the 2022 year.
Keep your eyes on your inbox this month. You are not going to want to miss the great content!
Recently Published on the Digital Owl’s Prose Developer Blog
In my honest opinion, MS Access is one garbage of a database. More likely, a database is too strong of a word. While I won’t be using Access in this article, there is a story (but I’m not here to have an Access bash party). Continue reading for an example of how you may use a correlated subquery and simulate the LEAD()
Window Function.
[#Ad]
If there is one newsletter I am reading every week, week in and week out, it is Growth Currency. If you are like me and wish to grow your own newsletter, Growth Currency is your currency.
Here is this week’s content.
Flattening arrays in PHP
#php
My thoughts: I was recently searching for some information on how to flatten an associative array in PHP and found this gem of a read.
Most interesting thing is that I forgot (or wasn't aware of) the spread operator (...
) and how it can be used with array_merge()
and array_values()
.
Good examples of how to flatten both types of arrays in PHP.
Working with Multiple User Metadata Queries
#php #wordpress
My thoughts: This is a dense 1st article in a (planned) series covering user metadata, the WP_Query()
class, and the All Users page in WordPress.
With the mass amount of knowledge online today for WordPress, I plan to 'jump on' these types of series that tackle a specific problem and how to solve it in order to learn more about WordPress development.
Smart approaches to keep databases from becoming bottlenecks
#sql #database #nosql
My thoughts: With the rise of data-driven websites and applications, it goes without saying that the database typically winds up being one of the main bottlenecks of an application.
Database performance tuning is an art just as much as it is a science.
Indexing, solid schema design, and the best queries are a good start to keep your database working in top form.
How to Build a Business Listing Using ACF Blocks and the Query Loop Block in a Block Theme
#php #wordpress
My thoughts: I've been using the free version of Advanced Custom Fields (ACF) on my niche bass fishing site, building out custom pages, and must say ACF is one handy plugin.
As of the time of the source articles' publishing, you can write ACF blocks in PHP code and not necessarily have to use React or block markup.
Since the Query Loop Block displays posts based on certain parameters, you can hone in on the specific posts and content you need for the requirements at hand.
For each loops with LATERAL Joins
#mysql #postgresql #sql
My thoughts: Learn how nested-loop JOIN
s work with a detailed explanation in this article. At one time I misunderstood the LATERAL
JOIN
myself, thinking it was another form of a regular subquery. However, as the author covers, it is not.
There are good supporting sources and articles with more information on the LATERAL
JOIN
.
How I run Integration Tests for my WP plugin using Lando and InstaWP
(Leonardo Losoviz via masterwp.com)
#php #wordpress
My thoughts: I'm that 'behind the times' developer who still needs to wrap my head around testing. There, I said it and feel better about it.
I'm not familiar with nor have used either of these tools:
Lando: Used to create development environments with Docker.
InstaWP: Used to create WordPress sites (not sure if this is for local development)
Here is a great walkthrough guide for setup and testing for WordPress development.
Symfony, Shopware, WordPress, and how to improve PHP-based Web Development
(Ingo Steinke via dev.to)
#php #wordpress #lamp #web
My thoughts: There is a lifetime of interesting information in this article. As much as so many in the industry hoped it would not be so; PHP still lives. (Yay!)
Here is one quote by the author I'm sharing that sums up what I've been unable to put into words myself based on my WordPress experience:
"I used WordPress, again and again, to see that no two instances are identical, that you should not mix old and new syntax…"
📰 Get your brand, product, or service the attention it deserves with affordable classified ad placement in the OpenLampTech newsletter.
MySQL Variables – Definition and Examples
#mysql
My thoughts: I've used MySQL user-defined variables in scripts, stored procedures, and Common Table Expressions (CTEs) at times but won't pretend for one minute I'm knowledgeable about them.
I know they have their place but like everything else, can be overused.
This article provides a high-level overview with information on the types, data type availability, and examples.
Similar: MySQL Transactions and User-defined session variables.
Thank you for reading OpenLampTech. This post is public so feel free to share it.
[#Ad]
Get smarter every single day by reading Refind. I read Refind every morning and there is always something interesting in the emails because I tailor the content to what I want to read.
Interesting Tech News and Articles 📰
🔎 IwocaPay integrates with WooCommerce to offer B2B buy now, pay later…
🔎 What Is NTFS (New Technology File System)? Meaning, Working, and Permissions
🔎 10 Trends That Will Shape the Online Writing Industry in 2023
Job Ad Placement
Have a job you need to fill? Tell the OpenLampTech developer audience about it!
Get your job ad placement in the OpenLampTech newsletter for only 35$ 20$ USD/week.
Send me an email at openlamptech@substack.com if you are interested.
Thank you for reading. I hope you have a great rest of your week.
Take care.
Joshua Otwell
Visit my developer blog, Digital Owl’s Prose, where I write regularly on CodeIgniter, PHP, WordPress, and SQL.
OpenLampTech is a reader-supported publication. You can support the publication with a virtual coffee for as little as $3 (USD).