OpenLampTech issue #38
PHP database connections; Yoda conditions; Check out the Symfony Station newsletter; Form validation in PHP; MySQL indexes; Thank you for making the OpenLampTech publication a success!!!
Hey 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 Blog
Just as you want to filter the rows of data returned in a SELECT
query with the equality comparison operator (=), you can also create a conditional filter to test if 2 values are not equal to one another. Learn more in the following article.
MySQL WHERE Clause Inequality Comparison Operators
Recently Published in the OpenLampTech Publication
I published the OpenLampTech WordPress Wednesday #6 for August 3rd, 2022. There are several links to great WordPress-related content.
Find out more in the publication piece:
[Sponsor]
Every day Refind picks 7 links from around the web for you, tailored to your interests. Loved by 50k+ curious minds.
Linux | Apache | MySQL/MariaDB | PHP
I have curated some fantastic reads for you this week. Letâs get to them!
How to Install WordPress on a LAMP Stack in Ubuntu
By: Lwin MMT
#wordpress #lamp #linux
WordPress. Ubuntu. LAMP stack. These words (and software) all fit and belong together. This is likely one of the staple combinations of the internet.
Follow along with this easy step-by-step guide to get all the LAMP stack components installed and then WordPress.Â
Very well written article.Â
âïž Read this articleâŠ
Deriving Ideal Indexes For Your SQL Database: A Guide
By: Arctype
#sql #mysql
Indexing is an art (and one I don't have).
The Arctype content is always spot-on and I'm digging this succinct passage directly from the opener in this article,
"Indexes are there to simplify our work when searching for data: they speed up SELECT queries at the expense of slowing down other kinds of queries like DELETEs, UPDATEs, and INSERTs instead."
In addition to other sage advice, this article has a nice example with explanations on a covering index.
You can't go wrong with the Arctype blogs; this one is another you can bookmark.
âïž Read this articleâŠ
Symfony Station Communiqué - 29 July 2022. A look at Symfony, PHP, and Cybersecurity News!
By: Reuben Walker
#php #symfony #drupal
The Symfony Station newsletter is one of my favorites I open and read it every week. There are always great reads shared in each issue.
Plus, the original content is epic with some fantastic deep dive coverage on related topics.
While covering PHP as a whole, there is also a lot of focus on Symfony and Drupal.
âïž Read this articleâŠ
How To Validate Your Forms Server-Side With PHP
By: Simon Ugorji
#php
I actually enjoy working with forms, form data, and form data validation in PHP. This post demos a PHP library (I haven't tried myself) that helps with form data validation.
You can write custom rules for form fields and use helper methods for dealing with any errors.Â
Looks like a solid library.Â
âïž Read this articleâŠ
Yoda Conditions (From the office)
By: anastasionico
#php
I'm aware of it but have never once used Yoda Conditions.
And, I honestly don't know if I should or not. They seem to make sense as to why they work. But again, I make bugs and mistakes all the time in code so maybe Yoda Conditions will help me.
Luckily, I am the only one (right now) developing the small applications I work on so the only person I can confuse with readability is me. I already do that pretty well anyways. đ
âïž Read this articleâŠ
Equal or identical. How to compare variables?
By: MichaĆ RomaĆczuk
#php
This is a concept I am still learning to understand and I scratch my head on it from time to time. If you want a good article with explanations and examples, here it is.Â
I learned more about and like these sections on comparisons within the post:
numeric value - string with a number and something extra
numeric value - string with a non-number at the beginning
numeric value - string with a big number
string - string
âïžRead this articleâŠ
PHP Tutorial: Connecting to a database
By: Yassine Himite
#php #mysql #sql
One of the most vital pieces of our applications is the database connection. Else, we don't have data-driven dynamic information. Unless I'm using CodeIgniter 4, I use PDO for pretty much all of the projects I'm working on.
However, mysqli is another means of connection with PHP and databases and this article covers a nice step-by-step use of working with mysqli.
Sections include:
Connections
Connection errors
Executing queries
Processing query results
Retrieving the Last Insert ID (see this article for an example with PDO)
Closing resources.
âïž Read this articleâŠ
I discover many articles I read and share in the OpenLampTech newsletter 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.
The Creat[ive][or] In Us
"Is this the perfect Linux laptop I've been waiting for?"
14 CSS Best Practices for Beginners
"I keep my hair cut short so I never have any to pull out."
"These things are everywhere."
How To Sell Your Newsletter: 5 Lessons From Real Publishers
"You can even sell them."
How to Design for Web Accessibility (5 Essential Tips)
"I'm doing better remembering Web Accessibility with my designs.â
Thank you for reading OpenLampTech. This post is public so feel free to share it.
Something extraâŠ
I was looking around on Amazon and noticed that one of my absolute favorite SQL books, SQL Antipatterns: Avoiding the Pitfalls of Database Programming (affiliate link), has an updated version coming out. If you are unfamiliar with this fantastic book, check out my recommendation for it I published right here in the OpenLampTech publication. Needless to say, I am super excited about this new edition coming!
How Can I Help You
Support OpenLampTech, my blog, and my work with a coffee if you 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!
Some inspirational âThank Youâ cards are in this Etsy Shop.
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.