OpenLampTech issue #14
PHP cheat sheet; WordPress maintenance checklist; Counting in CodeIgniter 4; PHP array_diff(); WordPress functions.php file; MySQL STR_TO_DATE(); Laravel Foreign keys
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 from the Digital Owl’s Prose blog and OpenLampTech page
Over on my technical blog, Digital Owl's Prose, I published, Counting with countAll() and countAllResults() in CodeIgniter 4.
Sometimes you need to know the number of rows in a table or which are returned in a result set. Using these 2 functions in CodeIgniter 4, you can get that information easily.
Here on the OpenLampTech Substack page I published:
I have curated some fantastic reads for you this week. Let’s get to them!
This Week’s Picks
✔️ Php 8.1-New Features | Array is a list? & Array Unpack
#php
For the time being, all the projects I'm working on use PHP version 7.4 so I don't have much working familiarity with PHP 8. I've never used the spread operator (...)
although it has been available (with some limited use to integer-keyed arrays) since version 7.4 and essentially works much like the array_merge()
function. Now in PHP 8.1, you can use the spread operator with string-based key arrays.
This post covers these points and differences.
There are also examples and explanations of the array_is_list()
function which returns true if the array argument array's keys begin with 0 (zero) and are consecutive through to the number equal to the total number of elements - 1.
✔️ PHP CodeIgniter framework - Features that every developer should know
#php #codeigniter
Although this is a highly opinionated piece, I can absolutely resonate with so many of the points covered here:
Small footprint 👣
Less complexity (MVC design that I can understand)
Minimal configuration to get up and running
CodeIgniter 4 is one fabulous framework. I know there are others out there to explore, but for now, I am sticking to CodeIgniter 4 for my continued learning path...
✔️ Modern PHP Cheat Sheet
#php
This post is a handy cheat sheet with code snippets and examples of several modern PHP features. The content within is actually a sample from the ebook Front Line PHP (not an affiliate link). While I haven't read this book (yet), I'm very interested nonetheless.
I absolutely want to up my PHP skills and this may be a great place to start...
Do you need to learn MySQL? Just starting and confused about how to query a table and get the data you need? I am creating premium MySQL Beginners content for this specific reason. To help those who want to learn the basics of MySQL but don't know where to start. Learn more about my premium MySQL blog posts and content as I develop and release them.
✔️ WordPress Website Maintenance Checklist for Beginners – 50+ Essential Tasks [Infographic]
#wordpress
To state the obvious, this post is a massive infographic of important WordPress tasks for a WordPress maintenance regime.
Here are a few that I probably should think about more often:
Media files clean up 🧹
Review Google analytics
Remove draft and posts revisions
✔️ How to add Foreign key in Migration – Laravel 8
#php #laravel #mysql
I'm so used to and comfortable typing out SQL DDL commands that I'm forcing myself to learn and use Migrations instead so that I'm am better skilled with the framework I'm working with. In addition to making a project more developer-friendly if any other devs work on the project after me.
A FOREIGN KEY
establishes a relationship between 2 tables and enforces referential integrity and is a critical piece of sound and normalized databases.
This post covers example Migrations in Laravel to implement a FOREIGN KEY
relationship in PHP code.
✔️ Develop clean MVC web applications with Laravel 9
#php #laravel
The author covers elements about their recently released book, Practical Laravel: Develop clean MVC web applications.
The post further explores details about the different sections in the book and how each builds upon the other while progressing through the chapters.
Looks very promising.
✔️ Beginner’s Guide to the WordPress Functions.php File + 5 Things You Can Do With It
#php #wordpress
In this post, learn what the functions.php file is and what it is used for in a WordPress site. Some limitations are covered along with 5 example code snippets you can use in a sites' functions.php file for enhanced/extra functionality.
I'm still in the infant stages of trying to learn WordPress development and know I'll need a solid understanding of the functions.php file and this post is a good primer for someone like me.
✔️ Str_to_date Function
#mysql
When I initially read this article, I thought to myself, "This should be simple. The STR_TO_DATE() function solves this easily. What am I missing here?"
And in truth, STR_TO_DATE()
does solve it. But the underlying lesson is realized throughout the article with solid examples using Common Table Expressions (CTE) and Stored Procedures, revealing - in a sense - what a function like STR_TO_DATE()
is doing behind the scenes.
I learned a great deal from this post and I think you will too.
Perhaps I should join the author's database class?
⭐⭐⭐ Many of the posts I curate and share in this newsletter, I read and enjoyed on Medium. If you are not yet and member and wish to join the platform, I would be more than grateful if you would use my sign-up link. At no extra cost to you, I will receive a small portion of your membership fee when you sign up. Thank you! 🙏
Support OpenLampTech, my blog, and my work with a coffee if you would like.☕
Newsletter Shoutout 📣
Extra stuff…
Did you enjoy this issue of OpenLampTech? Please share it with others so that they can enjoy the content as well. Thank you!!!
“Reply” or comment and let me know what you think of this issue of OpenLampTech.
What do you want to see more of?!?
What do you want to see less of?!?
I’d love to know!
Also, share with me links to your published blogs and articles so that I can read them and possibly include them here in the newsletter!
Thank you for reading. I hope you have a great rest of your week.
Take care.
Joshua Otwell
Visit my blog Digital Owl’s Prose, where I write regularly on CodeIgniter, PHP, and SQL. I’m also active on Medium, LinkedIn, Twitter, and Instagram.
How can I help you?
Are you thinking of starting up a blog? I use WordPress for my blog, Digital Owl’s Prose. Let’s both save money on the plans offered. 💸
Grab a Gmail HTML Email Signature template from my Etsy shop and make your emails pop and stand out. ✉️
Need hosting for your next web application or WordPress site? I use and highly recommend Hostinger. They have great pricing and service.
I enjoy reading Refind: The essence of the web, every morning in your inbox. Subscribe for free. Help me get a premium subscription by signing up yourself with my referral link.
Grab a free pack of mobile Creator wallpapers with my referral link.
Just getting started or wanting to learn MySQL? Find out about my premium blog posts and MySQL Beginner Series here.
Want to support this newsletter and my work? Drop some spare change in my Tip Jar.💰
Disclosure: Some of the services and products 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.
Cover photo creds: Image by 200 Degrees from Pixabay