This commit is contained in:
144 changed files with 20649 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<?php
// Используем для подключения к базе данных MySQL
class DatabaseMS
{
// Учётные данные базы данных
private $host = "omega-server";
public $db_name = "SKL_BLOKSQL";
private $username = "sa";
private $password = "haqdvega#";
public $conn;
// Получаем соединение с базой данных
public function getConnection()
{
$this->conn = null;
try {
$this->conn = new PDO("dblib:host=" . $this->host . ";dbname=" . $this->db_name.";charset=CP1251", $this->username, $this->password);
} catch (PDOException $exception) {
echo "Ошибка соединения с БД: " . $exception->getMessage();
}
return $this->conn;
}
}