Posts marked with “mysql”

MySQL Recursive CTEs for PHP Developers: Querying Hierarchical Data Without the Pain

by · July 1, 2026

0
 

Recursive CTEs in MySQL let you query trees, org charts, and nested categories in a single query. Here’s how to use them effectively with PHP. Every PHP developer eventually hits the “tree problem.” You have categories with subcategories, employees with managers, comments with replies, or menu items with children — and you need to query […]

 

MySQL JSON Columns

by · June 27, 2026

0
 

MySQL’s JSON column type has been around since version 5.7, but it’s one of those features where the gap between “I know it exists” and “I know when and how to use it well” is surprisingly wide. Used correctly, JSON columns give you schema flexibility exactly where you need it. Used poorly, they become a […]

 

This Week At PHP Architect: Optimizing A Query

by · March 12, 2025

2
 

This week, a client complained about a long-running query, and we needed to fix it. While I can’t divulge the actual query, I can give an idea of its nastiness, which we inherited when we took over the project. The query itself doesn’t matter, so don’t overanalyze it. Depending on the id’s used, this query […]

 

The Zen Of Mindful Programming

by · December 23, 2021

0
 

In this issue, Doug Dobrzynski helps us focus while programming with his article, Mindful Programming. While this article isn’t PHP specific, if you take time to digest what he’s talking about, I think you will find that all of us could benefit from using daily mindful techniques. In his article, Lessons Learned from Building a WebSocket […]

 

The Zen of Mindful Programming

by · December 10, 2021

0
 

2021 has been a turbulent year for the world and the PHP Community. We have seen change in many PHP related circles, from podcasts and this magazine to the very core of PHP itself. This issue tries to bring some of this into view while trying to help us focus.

 

Designing for MySQL Transaction Failures

by ·

0
 

Planning for failure is difficult because it’s usually not practical to predict every possible thing that could go wrong. This month we’ll see a mechanism for capturing those “rare and random” failures. by Edward Barnard

 

The Art of Data

by · December 2, 2021

0
 

This month, we dive into Libsodium, discuss gatekeeping, learn more about data access, and why even something that might be considered a “small bug” can cause massive damage. I’m not sure how many people read these Editorials. It’s even been explained to me that this isn’t an “Editorial.” Ha, the joke’s on them; I’m not […]

 

Education Station: Handling Data Access

by · November 11, 2021

0
 

I would posit that nearly every application that we as developers build is designed around data access. When it comes to web applications, we spend a lot of time looking up things in databases or files to display to users. We write backend workers to read, manipulate, and store data in various ways. We build […]

 

Exploring the Active Record Pattern

by ·

0
 

ORMs are great for Rapid Application Development. You can get started very quickly. The price you pay is the vast complexity they hide under the hood. As your system grows, that complexity can bite you if you are not careful enough. What is more, ORM packages create heavy objects that can make your life hard […]

 

Decrypting Cryptography

by · October 21, 2021

0
 

Change is hard at first, messy in the middle, and gorgeous at the end.—Robin Sharma PHP Architect is going through change, and we hope you follow us for the adventure.