OpenLampTech issue #49
Laravel Eloquent tips; 13 Linux distros from scratch; MySQL commands to improve your queries; Best databases for PHP; Thank you so much for reading the OpenLampTech newsletter!
Hey glad to have you here reading OpenLampTech! 👍
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 Developer Blog
As of MySQL v8, we have Common Table Expressions (CTEs) or the WITH
clause available. I recently learned how to use the WITH
clause in an INSERT
statement, similar to INSERT
with SELECT
. Like always, I enjoy sharing what I learn so let’s all learn together…
Recently Published in the OpenLampTech Publication
I published the OpenLampTech WordPress Wednesday #17 for October 19th, 2022. There are many articles for us all to learn something from:
Linux | Apache | MySQL/MariaDB | PHP
I have curated some fantastic reads for you this week. Let’s get to them!
7 Actionable Tips to Speed Up Your WordPress Website
By: Karan (via ninjateam.org)
#wordpress
There are articles galore across the web on how to make your WordPress site more performant. Many of them are garbage but a select few are worth reading.
In this article, learn about Web Core Vitals metrics that you can try and score for better user experience.
I'm paying attention to these (and should implement them myself)
Reduce image sizes
Use minified versions of HTML, CSS, and JavaScript code.
Get a quality web host (just use Hostinger!)
The Best Databases for PHP
By: Rachelle Palmer
#php #database
I often use MySQL with PHP and think of them as 'peas and carrots’ since they fit so well together (depending on who you ask).
However, there are many other databases you can use with PHP.
I've used MariaDB and Oracle as well and I know there are other databases you can use such as key-value and document store.
This article shares approximate percentages of developer surveys on the databases they use/prefer.
13 Independent Linux Distros That are Built From Scratch
By: sreenath
#linux
I've been using Linux as my personal driver for 10 years now and while I do love the whole ecosystem, I've recently made the switch to the "dark side of the force". 🙂 (Buying this laptop)
Linux has a lot to offer for pretty much any user persona and there is no shortage of distributions (distros) to choose from.
Check out the list in this article to learn more about independently-maintained Linux distros.
Some interesting ones for me are:
Gentoo
Mageia
Slackware (one of my first loves!)
7 Latest Tips about Laravel Eloquent that you Must Need to Know
By: sumyya khan
#php #laravel
Based on everything I see and read, Laravel's ORM - Eloquent - is quite powerful. I suppose that so long as you don't forget where you came from, that's okay.
Because one day, you're likely to run into a query requirement that you may have to write some raw SQL to fulfill.
Here are some Eloquent tips you should keep in mind. These I found interesting:
Query JSON columns in the
WHERE
clause with->
Get all table columns with
DB::getSchemaBuilder()->getColumnListing()
method.Compare 2 column values with the
whereColumn()
method.
MySQL : How to Backup and Restore? Commands for Backup and Restore in Mysql Database Administration
By: Pushkar Joshi
#sql
Even though point-and-click GUI tools such as phpMyAdmin and MySQL Workbench make it super-easy to take database backups, nothing beats mysqldump
command-line know-how.
The command-line is typically always there but those GUI tools may not be. Plus, mysqldump
is always available too within the database.
Tack this one up above the desk for quick reference of many handy examples and uses of the different kinds of database backups you can take with mysqldump
.
7 MySQL statements to improve your queries
By: Emilia Galdino de Olivera
#mysql
Many of these statements are really foundational and not necessarily an improvement I would say.
Nevertheless, you need to know them in order even to improve basic queries.
Some standouts:
ORDER BY
- You cannot guarantee any query results sorting order unless you use theORDER BY
clause.CASE
- One of the most powerful constructs in my opinion.CASE
gives you that bit of dynamics in SQL when you need it. (Related: Dynamic RPAD() Function using a CASE Expression – Oracle SQL Example)JOIN
- We have to normalize data into separate tables and aJOIN
allows us to bring the data back together.
Thank you for reading OpenLampTech. This post is public so feel free to share it.
Interesting Tech News and Articles 📰
🔎 DataStax and Intel Collaborate to Advance Apache Cassandra and Apache Pulsar-based Technologies…
🔎 Laugh all you want. There will be a year of the Linux desktop
🔎 The finest open source databases and their advantages over proprietary ones
🔎 Linus Torvalds to kernel devs: Grow up and stop pulling all-nighters just before deadline
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).