Updated SQL to work with MySQL 5.x.

Just needed some extra parenthesis around FROM statements.

Package only includes changed files.

More...