Add MySQL class

Check /template/tools/database.php for use.