Chalk this up to "not one of my finer (smarter) moments". This is so silly, I probably shouldn't even admit to not realizing this – but I'm putting it here so I never forget it again.
I had wanted to run a SELECT query where the conditional would be set with the "LIKE" – but I needed to construct the query using the sprintf() function.
Normally the LIKE is used in mysql like this:
SELECT firstname, lastname FROM users WHERE lastname LIKE '%son';
That would get all lastnames including: Johnson, Jameson, etc. etc. Now when you use the sprintf() function it looks kind like this:
$query = sprintf("SELECT firstname, lastname FROM users WHERE lastname='%s';", $_REQUEST['Jameson']);
The brain-fart I had was with the wildcard "%" and the "%s". Doing this gave me errors.
$query = sprintf("SELECT firstname, lastname FROM users WHERE lastname LIKE '%%s';", $_REQUEST['son']);
Don't ask me why it took me as long as it did to realize this is what you had to do: