OpenLampTech issue #56
WordPress cron jobs | Laravel controllers | SQL UPDATE with SELECT | Independent Linux distros. Thank you for reading the OpenLampTech developer newsletter!!!
I’m so grateful you are 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:
Recently Published on the Digital Owl’s Prose Developer Blog
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.
[#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.
Recently Published in the OpenLampTech Publication
Earlier this week I published a fantastic interview with freelance WordPress and WooCommerce developer Igor Benić. If you missed it, this one is a must-read:
💡 Epic WooCommerce source I saw in a Facebook group someone shared. There is so much good stuff here. I’ve been reading and studying a lot of the PHP code snippets in order to learn more about the customizations you can make in WooCommerce with PHP. Bookmark this one!
Here is the content I am sharing I enjoyed this week
Laravel — Your controllers should look like this
#php #laravel
My thoughts: I've most definitely got to apply these practices to my own Controllers in CodeIgniter 4.
Although this article is targeted at Laravel developers, there is still plenty to learn here about this type of best practice.
Figuring out how to apply those best practices to your own framework can be a valuable learning experience in and of itself.
It always is for me.
➡️ Read more…
How To Create and Modify a WordPress Cron Job
#wordpress
My thoughts: The cron Linux/Unix command is used to execute scripts and/or other programs and commands on a web server in the background. One handy thing about cron is it can be scheduled out to run at certain dates and times, oftentimes, multiple times a day if necessary.
In WordPress, WP Cron is the intermediary used for cron tasks. While they do share some similarities, they are not the same utility.
➡️ Read more…
PHP 7 vs PHP 8: A Comparison
#php
My thoughts: As of the time of this publication, PHP 7.4 has reached End of Life (EoL) with PHP 8.0 not so far behind (if not already).
Each release brings upgrades and improvements to the language. But, what are the major differences between PHP 7 and 8?
This article has you covered.
Here are some of the major differences:
Named arguments
Constructor Property Promotion
Match Expression
Several new PHP functions
➡️ Read more…
UPDATE from a SELECT
#sql #mysql #postgresql
My thoughts: SQL has all kinds of little powerful features (I say that lightly - which is far from the case). One of them is being able to generate (used for lack of a better word) useful or needed data for an UPDATE
or INSERT
command using a SELECT
statement.
UPDATE
with SELECT
most often requires an JOIN
on the generating table. As a beginner, this could be confusing as the JOIN
is somewhat different as opposed to a typical querying data JOIN
.
This article by the fantastic SQL for Devs site is a good one to start with for this type of command.
➡️ Read more…
The 7 Best Independent Linux Distros You Can’t Miss Out On
#linux
My thoughts: Canonical (Ubuntu) and Red Hat (RHEL) are household names in the Linux space. And while companies like these provide the community with solid Linux distributions used by thousands of users, there are other independent Linux distros out there. This list has 7 indy distributions with information you can try.
An aside: I played around with Gentoo Linux around 8 or so years ago and let me tell you, it was fun to tinker with. Not to mention, you will learn a lot too.
➡️ Read more…
Can I use… window clause
#sql
My thoughts: I've said it before and will say it again; Window Functions are some of the most powerful (and useful IMO) in SQL.
For one (among many many things), they mitigate the need for what would normally require you to type a bunch of hacky spaghetti code (read this blog post on LEAD()
functionality without window functions).
In the event, you need to re-use the same windowing parameters (termed loosely here) - PARTITION BY
, ORDER BY
, ROWS/RANGE FRAME
- in many OVER()
clauses, most SQL dialects support a window clause.
Learn more from one of the true masters of the language in this short, high-level overview article.
➡️ Read more…
📰 Get your brand, product, or service the attention it deserves with affordable classified ad placement in the OpenLampTech newsletter.
Interesting Tech News and Articles 📰
🔎 …impacting Acer laptops that can allow an attacker to deactivate UEFI Secure Boot
🔎 These once popular skill sets now have fewer takers
🔎 The 3 tiers of Linux distribution difficulty
🔎 Stackhacks: Get More Readers - All 4 Parts (a mega-awesome piece from the
)🔎 Datavail TechBoost™ Releases Powerful New Features for Its Automation Platform for Databases
🔎 7 Developer Portfolio for inspiration
🔎 How to make a Table of Contents in Substack (quite useful piece by
)🔎 Why you should never use px to set font-size in CSS
🔎 Exadata and MySQL enhancements highlight Oracle’s renewed impact on the IT conversation
🔎 Google BigQuery introduces Apache Iceberg Tables
🔎 7 Git tips for technical writers
🔎 HeroPress: Blessings and curses of turning your hobby into a career
[#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.
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).
Have you tried ChatGPT to write code? ExamplePrompt: Write a simple PHP script for a newsletter subscribe sign-up form that asks for an email address and sends that to your email address. Include the form html.
I've seen some tests and it appears to do a great job...Kind of amazing. I bet your readers would like to hear some of your prompts. However the real hard core coders may find this is a controversial subject.
Thanks for the shout out and your support, Joshua!