MySQL


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 […]


MySQL Tricks: Splitting Strings

I needed to run a query to find out how many people in our user table had an email address on a domain within a set list from another table.  Normally, I might have written a PHP script for this, pulling users that matched a loose LIKE statement of email_address […]


Basic Refresher on Signed vs Unsigned Integers

You may have heard recently that Psy's "Gangum Style" video "broke" YouTube due to the database using an signed integer that was 32 bits, never expecting a single video to ger more than 2.147 trillon views.  So they upped it to a 64 bit integer.  interestingly enough, they still left […]


Discovering MySQL GROUP_CONCAT

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 […]


Quick Changing the MySQL Engine on Existing Tables

On install, MySQL has its default storage engine set to MyISAM. It's heavily used, but IMHO, a bad engine to use for most applications. MySQL does offer a variety of other engines, including Memory, Merge, Archive, Federated, and of course InnoDB. They each have their uses and their pros and […]


Multi-Table Update in MySQL

I think one thing I love about web development is that I'm always learning something new! Even with my database skills, just when I think I “know it all” (HA HA HA), I learn some new trick! This week, I had to write some scripts to move some data around […]


MySQL, BOOLEAN, and ColdFusion

I work with both MySQL and PostgreSQL DBMS.  Given the choice, I'll use PostgreSQL over MySQL 99% of the time.  MySQL has its benefits, don't get my wrong, but overall I find PostgreSQL to be the more mature DBMS.  One of my greatest annoyances with MySQL is that it does […]