Watching the WordPress hacker list this week, a couple messages related to selecting information about users schooled me on MySQL syntax. I obviously knew the following would work, but I’d previously used the UNION syntax in similar situations and somehow hadn’t thought of writing it this way:
SELECT
(SELECT meta_value FROM wp_usermeta WHERE meta_key = ‘first_name’ AND [...]
Posted January 16, 2008 by Casey Bisson
Categories: Technology. Tags: join, mysql, queries, subselect, syntax. One Comment.
I got itchy about magic quotes the other day because it’s the cause (through a fairly long cascade of errors) of some performance problems and runaways I’ve been seeing lately (pictured above).
But I deserve most of the blame for allowing a query like this to run at all:
SELECT type, data, count(*) AS hits
FROM wpopac_WPopac_bibs_atsk
WHERE data [...]
Posted August 23, 2006 by Casey Bisson
Categories: Libraries & Networked Information, Technology. Tags: bug, bugs, mysql, patch, performance, queries, query, query failures, wpopac. Be the first one.