Recursive Queries With SQL…WHAT!?!

In our application, AgriLife People (ALP), one thing we needed was to be able to build a hierarchical chain of a unit and all its child units.  This is primarily used for cascading down management rights and for building contact lists.  In previous iterations of the application, we cheated by […]

MySQL Replace

Another quick post on a little MySQL function I learned about recently.  As with many such things, its one of those things I discovered only when I needed it (it’s not like I go reading the MySQL manual for fun or anything LOL). So the issue in this case was […]


A relatively quick post this week, but I discovered something new in MySQL (as in new to me). A common query one might need to run is to get a list of rows from one table and it's related rows in a connected table.  For example, given these tables: Let's say I […]

MySQL Trigger Flakiness And NULL in Comparisons

On one of our application's databases, we have some triggers in place for row updates and deletes. These triggers fire off stored procedures that take care of making data snapshots for auditing purposes before changes are made. This week, we discovered that those triggers were not always firing, resulting in some gaps […]