merged in support for mysql joins from brown131