예제 #1
0
 /**
  * 
  * @return connection to default database
  */
 public static function getDefaultDBConnection()
 {
     $link = AdminUtility::getConnection();
     if ($link) {
         $successful = mysqli_select_db($link, DEFAULT_DB_NAME);
         if (!$successful) {
             die('Unable to select database: ' . mysql_error());
         }
     } else {
         die('Could not connect to database: ' . mysql_error());
     }
     return $link;
 }