/**
  * Конструктор класса.
  * @global array $_DBSETTINGS - глобальный массив с настройками для бд:
  *      host - Хост.
  *      user - Пользователь.
  *      password - Пароль.
  *      db_name - Имя Базы Данных.
  *      charset - Кодировка.
  */
 public function __construct()
 {
     $this->error = null;
     $this->mysqli = MySqliConnectHelper::getConection();
     if (mysqli_connect_errno()) {
         $this->error = "Ошибка подключения к базе данных : " . mysqli_connect_error();
         $this->error .= "<br>Обратитесь к администратору.";
         echo $this->error;
         exit;
     }
 }
 public static function update()
 {
     self::$object = new MySqliConnectHelper();
 }
Beispiel #3
0
 public function __construct($query)
 {
     global $_DBSETTINGS;
     $this->query = $query;
     $this->mysqli = MySqliConnectHelper::getConection();
 }