case "F": $lStyle = "database-failure-message";break; case "W": $lStyle = "database-warning-message";break; }// end switch return "<div class=\"".$lStyle."\">" . $pMessage . "</div>"; }// end function try{ echo format("Attempting to connect to MySQL server on host " . MySQLHandler::$mMySQLDatabaseHost . " with user name " . MySQLHandler::$mMySQLDatabaseUsername,"I"); $MySQLHandler->openDatabaseConnection(); echo format("Connected to MySQL server at " . MySQLHandler::$mMySQLDatabaseHost . " as " . MySQLHandler::$mMySQLDatabaseUsername,"I"); try{ echo format("Preparing to drop database " . MySQLHandler::$mMySQLDatabaseName,"I"); $lQueryString = "DROP DATABASE IF EXISTS " . MySQLHandler::$mMySQLDatabaseName; $lQueryResult = $MySQLHandler->executeQuery($lQueryString); if (!$lQueryResult) { $lErrorDetected = TRUE; echo format("Was not able to drop database " . MySQLHandler::$mMySQLDatabaseName,"F"); }else{ echo format("Executed query 'DROP DATABASE IF EXISTS' for database " . MySQLHandler::$mMySQLDatabaseName . " with result ".$lQueryResult,"S"); }// end if }catch(Exception $e){ //DO NOTHING. THIS IS HERE DUE TO A MYSQL BUG THAT HAS NOT BEEN PATCHED YET. }//end try echo format("Preparing to create database " . MySQLHandler::$mMySQLDatabaseName,"I"); $lQueryString = "CREATE DATABASE " . MySQLHandler::$mMySQLDatabaseName; $lQueryResult = $MySQLHandler->executeQuery($lQueryString); if (!$lQueryResult) { $lErrorDetected = TRUE;