game/_incl_data/class/__db_connect.php
2022-12-19 20:26:14 +02:00

21 lines
528 B
PHP

<?php
if (!defined('GAME')) {
die();
}
$db = [
's' => 'localhost', // server
'd' => 'newcom1_abk', // database
'u' => 'newcom1_abk', // user
'p' => '4nWYsIM[c?}P' // password
];
$dsn = 'mysql:host=' . $db['s'] . ';dbname=' . $db['d'];
include './_incl_data/mysql_override.php';
$dbgo = mysql_connect($db['s'], $db['u'], $db['p']);
mysql_select_db($db['d'], $dbgo);
mysql_query('SET NAMES cp1251');
$pdo = new PDO($dsn, $db['u'], $db['p'], [PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES cp1251"]);