MySQL ‘unknown column’ in ‘on clause’ error

So if your MySQL query is mysteriously giving you an error about an ‘unknown column’ in the ‘on clause’, it’s possibly because in MySQL 5.0.12 the handling of the left join was changed to conform to the SQL standard. Basically it means that because of changes to precedence you’ll probably have to re-order your list of tables in the from statement. Documentation here. Discussion of the problem here.