made the code more composer friendly

This commit is contained in:
2025-11-19 00:03:03 -08:00
parent a14df54cd9
commit 466d34c39f
12 changed files with 164 additions and 84 deletions

View File

@@ -1,4 +1,5 @@
<?php
namespace Novaconium;
class Database {
@@ -6,7 +7,7 @@ class Database {
public $lastid;
public function __construct($dbinfo) {
$this->conn = new mysqli($dbinfo['host'], $dbinfo['user'], $dbinfo['pass'], $dbinfo['name']);
$this->conn = new \mysqli($dbinfo['host'], $dbinfo['user'], $dbinfo['pass'], $dbinfo['name']);
if ($this->conn->connect_error) {
die("Connection failed: " . $this->conn->connect_error);
}