Updated MySQL class to use MySQLi extension

@mthie PTAL