

Discover more from OpenLampTech
OpenLampTech issue #30
Laravel tips; Ignore WordPress FSE; PHP array sorting; Linux useradd/adduser; SQL engineering guide; Thank you for reading the OpenLampTech newsletter! We are growing!
Hey hey glad to have you here! 👍
If someone 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 Blog
This week on the Digital Owl's Prose developer blog, I published a short post on the MySQL DATE()
function.
DATE()
extracts just the date portion from a DATE
or DATETIME
value.
Read, MySQL DATE() Function with examples, to learn more.
📣 Coming soon…
Your subscription to the OpenLampTech newsletter just got better!
In the coming weeks, expect more content and editions on MySQL, WordPress, developer interviews, book overviews, and more.
I'm taking OpenLampTech to the next level as your MySQL, PHP, and LAMP stack media source.
Let's do this! 🔥🔥🔥🔥🔥🔥🔥
Many articles I read and share in the OpenLampTech newsletter, I discovered on Medium. With a membership, you can read unlimited articles on the platform. Consider using my sign-up link to become a member, and at no extra cost to you, I will receive a portion of your membership fees which helps me continue publishing the OpenLampTech newsletter.
Linux | Apache | MySQL/MariaDB | PHP
I have curated some fantastic reads for you this week. Let’s get to them!
The CodeIgniter Decorator Library
By: Unknown
#php #codeigniter
I haven’t used any Decorator-type code (yet) in any of my small number of CodeIgniter 4 projects.
In this post, the author covers moving a lot of the setup code out of the Controller, in addition to any unnecessary view logic, into a Decorator.
Quite an interesting concept and I can see where Decorators could help thin out the Controllers and view files.
How to Sort Arrays in PHP
By: Teman Ngoding
#php
If you're programming with PHP, you're going to be using arrays.
A lot.
There are a ton of built-in array functions and several of them are specific to sorting.
This article covers some of the common array sorting functions with examples.
I'm glossing over just these 4 but, do read the article for examples of others:
sort()
- Sorts values from lowest to highest but ignores any key-value associations.rsort()
- Sorts values from highest to lowest but ignores any key-value associations.asort()
- Sorts an associative array in ascending order according to the value and maintains the key-value relationship.arsort()
- Sorts an associative array in descending order according to the value and maintains the key-value relationship.
Similar: Sorting associative arrays in PHP with array_multisort() – New learning
Ignore Full Site Editing
By: Spencer Forman
#wordpress
Just when I'm thinking about, concentrating on, and learning more about Full Site Editing (FSE), I read this. 🙂
Thank you, internet! (Lol)
As the author suggests, there are many "stacks" you can (and maybe should) use already available to build out WordPress sites. I'm familiar with the Astra theme but haven't ever looked into Kadence, GeneratePress, or GenerateBlocks until now.
I suppose knowing how to use FSE, page builders, and theming can't hurt so long as I don't have a brain melt. 🙂
useradd vs adduser: Which command to use?
By: Sneh Chauhan
#linux
Both of these commands do the same thing, create a new user.
However, there are differences between them.
adduser
:
Creates a home directory and group for the new user.
Prompts for the password and additional information
useradd
:
Creates the new user but no group, home directory, or additional information.
I sure enjoy learning about Linux and all of the things you can do with it.
20 Useful Laravel Tips
By: Ashley Allen
#php #laravel
For all the Laravel developers, this article is your go-to list of tips.
Ashley Allen has a fantastic newsletter you should also subscribe to.
A couple of takeaways on this list for me:
Moving Logic into Methods - I absolutely should start using this approach more (even in vanilla PHP and CodeIgniter).
Using
DATETIME
Fields Instead of Booleans - Just as mentioned in the article, you get some additional information from the column, along with a boolean-like result too.
How To Prevent SQL Injection In PHP: Three Essential Methods
By: Emmanuel C. Okolie
#php #mysql
SQL Injection awareness is so important, especially in web development where oftentimes our applications and sites accept and process user input.
This article shows 3 simple examples of how to mitigate SQL Injection using:
Superstore Analysis Using MySQL
By: Mohamed Harris Peer Mohamed
#mysql
This article has 10 sample analytical questions for sales data.
I learn more about SQL with these types of queries and questions that are outside of the typical CRUD-type queries.
I enjoy solving these types of analytical questions with MySQL in my day job when I get the opportunity.
SQL Engineering Guidelines
By: KRISTIAN KÖHNTOPP
#mysql
There has to be a lifetime of knowledge in this article and I'm paying undivided attention. This one is quite the lengthy read and I reread it multiple times and will multiple more. You definitely need to read it as well.
Bookmark.🔖
Frontend Madness: SPAs, MPAs, PWAs, Decoupled, Hybrid, Monolithic, Libraries, Frameworks! WTF for your PHP backend?
By: Reuben Walker
#php #laravel #symfony #drupal #wordpress
I won’t even begin to pretend I know much at all about all these front-end frameworks. I just do get by with LAMP-stack and CodeIgniter 4 apps with some jQuery here, there, and yonder.
Reuben Walker from the Symfony Station site has dropped one mega article you must read. There is a ton of good information here with plenty of linking sources to boot.
I definitely am interested in Svelte for sure and have it on my radar.
Interesting newsworthy read
The Creat[ive][or] In Us
185 Software Development Acronyms
“You’re bound to use one.”
The Game Is Rigged: Rethinking The Creator Economy
“Got me thinking…”
Publishers: 3 ways you should be repurposing content
"I'm updating my older articles."
Indieweb and self-hosting my own space
“Plenty of publishing options out there.”
8 Shocking HTML tips you probably don't know about
"I am indeed shocked.”
How Can I Help You
Support OpenLampTech, my blog, and my work with a coffee if you would like.☕
📰 Get your brand, product, or service the attention it needs with affordable classified ad placement in the OpenLampTech newsletter.
Discover premium MySQL learning material over in my Kofi Shop today!
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.
Want to support this newsletter and my work? Drop some spare change in my Tip Jar.💰
Disclosure: Some of the services and product links in this email are affiliate links. At no additional cost to you, should you make a purchase by clicking through one of them, I will receive a commission.