Пример #1
0
 /**
  * Make connection
  *
  * @return object value
  */
 public function connect($db)
 {
     if (!self::$connection) {
         self::$connection = mysqli_connect($db["dbHost"], $db["dbUser"], $db["dbPwd"], $db["dbName"]);
     }
     return self::$connection;
 }
Пример #2
0
 public function connect()
 {
     if (!self::$connection) {
         self::$connection = mysqli_connect(DB_HOST, DB_USER, DB_PWD, DB_DATABASE);
     }
     return self::$connection;
 }