getDbUsername() public static method

public static getDbUsername ( )
Ejemplo n.º 1
0
 public function __construct()
 {
     $dbHostname = Core::getHostname();
     $dbUsername = Core::getDbUsername();
     $dbPassword = Core::getDbPassword();
     $dbName = Core::getDbName();
     try {
         $this->link = mysqli_connect($dbHostname, $dbUsername, $dbPassword, $dbName);
     } catch (Exception $e) {
         // or die("Couldn't connect to database: " . mysql_error());
     }
     try {
         @mysqli_query($this->link, "SET NAMES 'utf8'");
     } catch (Exception $e) {
         //  die ("couldn't find database '$g_db_name': " . mysql_error());
     }
 }