OpenLampTech issue #116
SheetDB API for Google Sheets | SQL execution order | WordPress ACF big update | Do you need foreign keys | WordPress plugin git repo set up.
Thank you for reading the OpenLampTech newsletter!
If someone awesome shared this newsletter with you and you are not yet subscribed, please use the Subscribe button below and join:
OpenLampTech has sponsorship opportunities for your brand, product, or service in the weekly newsletter. As an independent publication, collaboration is very affordable.
How to get data from Google Spreadsheet using PHP
Anytime you can or have to integrate with a spreadsheet software, it should be as seamless as possible. Let's face it, spreadsheets are a big part of most companies' data and/or workflow. I am a big fan of Google Sheets myself, and I use Microsoft Excel a great deal too. Learn how to pull data from a Google Sheet using PHP and the SheetDB API. No particular framework is needed.
[Medium]
You can get by for a little while without knowing (or caring) about SQL query execution order. I did. But at some point, you're going to have to realize that SQL syntax and the execution of said SQL code syntax are not one and the same. Particularly, if you're working with Derived Tables or Inline Views and want to filter by any of that data in the WHERE
clause. Although SELECT
is one of the first clauses syntax-wise, it's also one of the last to execute.
[Medium]
SQL Simplified: Crafting Modular and Understandable Queries with CTEs
I've had to write some gnarly SQL queries in MS Access (if you want to call Microsoft Access SQL) without Common Table Expressions (CTEs). And I never truly appreciated their (CTEs) value until then. CTEs are a game changer. Especially, if you have a complex query or Derived Table that makes up the data or table source in a query JOIN
or FROM
clause. Placing that same SQL in a CTE cleans up the query, making it more readable. And manageable. This is just one of many potential use cases for CTEs.
[KD Nuggets]
If you follow any of the happenings in WordPress (I try to avoid every bit of the #wpdrama - there is plenty of that), you may have heard about Data Liberation from Matt Mullenweg.
It boils down to the ability of a user to migrate to or from WordPress with one click. I believe user data is a priority whether coming to or leaving one system for another. So this is a good thing. In my opinion, WordPress is becoming more challenging for both users and developers. Hopefully, this particular aspect remains simple(r).
[wordpress.org]
How to Set Up a WordPress Plugin GitHub Repository
I think it's safe to say that the, “It works on my machine,” adage isn't going to cut it in the land of WordPress plugin development. Tanner Record has a fantastic newsletter with useful content all about WordPress dev’ing (the right way - IMHO).
In this article, Tanner covers why you should have a good Github repo for your WordPress plugin.
One key point is to have good documentation and this quote directly from the source, sums it up nicely:
“If you want people to use your codebase or contribute to it, tell them how to use it.”
[Tanner Record]
Do you really need Foreign Keys?
I feel like I need foreign keys. But, not for the reason; everyone else does - and so should I. For many of the websites and applications I've worked on, the performance impact regarding foreign keys on writes and deletes was negligible. However, I can see where in other use cases, any performance impact caused by foreign key deletes and writes is non-negotiable. There are many pros and cons for foreign key use and each scenario is likely different.
[shayon.dev]
A Big Change Is Coming to Advanced Custom Fields. Are You Prepared?
Advanced Custom Fields (ACF) developers at WP Engine (the team behind this massively used WordPress plugin) are making significant (security) improvements to the plugin. In regards to escaping unsafe HTML. Learn more in this article by The WP Minute where one of ACF’s developers provides more context and information in the interview.
[The WP Minute]
Thank you for reading. I hope you have a great rest of your week.
Take care.
Josh Otwell
When you are ready, here are more ways I can help...
Content, E-commerce Development, and Email/Newsletter Services - Photography services; Shopify and WooCommerce customizations, development, and setup; Email and Newsletter setup and management.
Interested? Great!
Just hit Reply and ask for more information about any of these services.
OpenLampTech is a reader-supported publication. You can support the publication with a virtual coffee for as little as $3 (USD).
[#Classifieds, #Affiliates, #Click Ads, #Shoutouts]
🤝 OpenLampTech earns a small commission (or payment/gain in some form) from many of these links. Your support helps keep the weekly OpenLampTech newsletter free for readers.
Take your Laravel applications to the next level with Battle Ready Laravel by Ash Allen. Learn how to improve the performance, maintainability, and security of your Laravel projects in this e-book.
The online DNS course for developers. Learn more at Nslookup.
AI-powered SQL generator and data analytics tool. Learn more at SQLAI.ai - AI, SQL & DATA.