public static function databaseConnection() { if (self::$mysqlConnection === 0) { self::$mysqlConnection = mysqli_connect("localhost", "root", "", "musicweshare"); if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } } return self::$mysqlConnection; }