Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/rekall/krisgale.com/wp-includes/formatting.php on line 74

when mixing standard selects containing table aliases with LEFT JOIN’s you need be aware of a critical change as of mysql 5… if you reference a table alias in an ON clause the same way you might have in verison 4, mysql may report an ‘unknown column’ error.

so, a query of the form:

SELECT a.id FROM alpha a, beta b
LEFT JOIN gamma g ON (g.id = a.gamma_id)
WHERE b.id = a.beta_id

would report error #1054 - Unknown column ‘a.gamma_id’ in ‘on clause’

whereas:

SELECT a.id FROM (alpha a, beta b)
LEFT JOIN gamma g ON (g.id = a.gamma_id)
WHERE b.id = a.beta_id

… would not.

in case you failed to detect the subtle difference between the two, it’s the inclusion of the now-apparently-very-important parentheses around the list of tables before the LEFT JOIN.

this ‘bug’ has been reported to mysql ab (even though they claim is not a bug).