OpenLampTech No. 144
MySQL counter | References in PHP | LAMP stack with an LLM? | WordPress your way | GROUP BY and PARTITION BY differences.
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.
All commentary is mine unless otherwise quoted.
How to Define a Counter in MySQL
I'm of the mind to always have some kind of unique row identifier in the database table. Even if you never use it.
MySQL has the AUTO_INCREMENT attribute that makes this effortlessly useful. With AUTO_INCREMENT you can set the starting and incremental value for more fine-grained tuning or use cases.
[dev.to]
PHP References: Using the & Operator with Loops
References are an ultra-important concept and one that I'm still trying to get my head around. Particularly, in for, while, and foreach loops targeting objects and arrays. You can modify object properties and array elements using the & operator should you need to.
[Medium]
Build a Database Schema In 5 Steps
I've been using/working with SQL consistently for the last 5+ years. As tough as some of the queries I've written have been, schema design is tougher for me.
There's a whole lot more to it than sticking everything In a table with an auto number and calling it done.
Good tips in this article by Dominik Keller of Five.
[dev.to]
Should the LAMP Stack Add an Open LLM, Like Meta’s LLaMA?
This really could be huge. As someone who was at one time, 100% anti-AI, I'm now about 50% anti-AI. Personally, I've been having good luck with CharGPT on some coding projects.
All that said, I'm not sure if an LLM should be part of the beloved LAMP stack.
[The New Stack]
GROUP BY vs. PARTITION BY in SQL
While GROUP BY and PARTITION BY sound very similar, each clause does something different in a query.
PARTITION BY allows you to apply calculations to a subset of rows with Window Functions, where GROUP BY collapses similar rows into a single row for calculations.
[Medium]
Go Ahead and Use WordPress Your Way
I’m often undecided if the flexibility in WordPress nowadays is a good thing or a bad thing. Choices are good but for a fog-headed brain like mine (can get), it might not be so good.
One thing about it with, with as many varied ways that you can build a WordPress site these days, there is sure to be one for you and a community behind it.
[The WP Minute]
[Affiliate]
Consuming APIs in Laravel - Learn how to confidently integrate third-party APIs in your Laravel projects using maintainable, testable, and extensible code.
Something Different
My day job has allowed me to learn many different technical skills in addition to PHP and SQL.
Pretty much daily, I use Python, Powershell, Google Sheets/Excel, MS Access, and AutoCAD Civil 3D.
I plan on writing more small and digestible articles like these covering tips and tricks I have picked up from such a diverse technical skill set that help me get the job done.
They are not revolutionary or groundbreaking by any means
But, they are useful (which is what I'm after).
Below are a few of the recent pieces I've published on Medium. (Friend links included so anyone can read them - even if you don't have a Medium account):
Automate Image File Renaming on MacBook: A Step-by-Step Guide for Photographers
Pivot a Column of Values to a Comma-Separated List in Google Sheets
Combine Multiple CSV Files Into One CSV Using Shell Scripting
(On an unrelated side note, I have started up a newsletter about my photography passion. Check out the most recent issue of ShutterCraft 101.)
[#Affiliates and Classifieds] - Your support keeps the OpenLampTech newsletter free for readers
Ultimate Laravel Boilerplate to help other indie hackers deliver their SaaS in hours. Get started with LaraFast today! (affiliate)
Popups, newsletters, and abandoned carts. Use Omnisend with integrated email and SMS campaigns. (affiliate)
Check out the Ecommerce Coffee Break newsletter (and podcast) for the latest in Shopify news. (subscriber incentive)
Thank you for reading. I hope you have a great rest of your week.
Take care.
Josh Otwell
Some links may be affiliate links from which I earn a small commission at no additional cost to you.


