From 3f8e5db2ae69f315df0e8fefc0cf0b0ed7423e00 Mon Sep 17 00:00:00 2001 From: Nereziel Date: Tue, 14 Nov 2023 13:12:26 +0100 Subject: [PATCH] add support for custom port in database --- website/class/config.php | 1 + website/class/database.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/website/class/config.php b/website/class/config.php index bb004a2a..14721fd0 100644 --- a/website/class/config.php +++ b/website/class/config.php @@ -1,5 +1,6 @@ PDO = new PDO("mysql:host=".DB_HOST."; dbname=".DB_NAME, DB_USER, DB_PASS, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8")); + $this->PDO = new PDO("mysql:host=".DB_HOST."; port=".DB_PORT."; dbname=".DB_NAME, DB_USER, DB_PASS, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8")); } public function select($query, $bindings = []) { $STH = $this->PDO->prepare($query);