/**
  * Log database error
  * @param type $link
  */
 public static function logMySQLError($link)
 {
     $error = mysqli_error($link);
     if (!empty($error)) {
         AdminUtility::writeToLog(new Exception($error));
     }
 }